summaryrefslogtreecommitdiffstats
path: root/test/objcopy.c
diff options
context:
space:
mode:
authorjhendersonHDF <jhenderson@hdfgroup.org>2023-10-12 16:32:23 (GMT)
committerGitHub <noreply@github.com>2023-10-12 16:32:23 (GMT)
commitea3f92605761e1ff17d858df303dc375df7efc1c (patch)
tree716311100f8d0f0dc77bca31245878546952aabc /test/objcopy.c
parent0feda66ff0dccdf77453b7c881c80be244e0ae12 (diff)
downloadhdf5-ea3f92605761e1ff17d858df303dc375df7efc1c.zip
hdf5-ea3f92605761e1ff17d858df303dc375df7efc1c.tar.gz
hdf5-ea3f92605761e1ff17d858df303dc375df7efc1c.tar.bz2
1.14 sync with develop (#3660)
* 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 <lrknox@hdfgroup.org> Co-authored-by: Jordan Henderson <jhenderson@hdfgroup.org> 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 <lrknox@hdfgroup.org> * 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 ---------
Diffstat (limited to 'test/objcopy.c')
-rw-r--r--test/objcopy.c1677
1 files changed, 836 insertions, 841 deletions
diff --git a/test/objcopy.c b/test/objcopy.c
index 8848ab1..d604c54 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 @@ error:
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 @@ done:
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 @@ done:
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 @@ done:
*
* 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 @@ error:
H5Tclose(tid);
}
H5E_END_TRY
- return FALSE;
+ return false;
} /* end compare_attribute() */
/*-------------------------------------------------------------------------
@@ -895,7 +896,7 @@ error:
*
* 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 @@ error:
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 @@ error:
H5Aclose(aid);
}
H5E_END_TRY
- return FALSE;
+ return false;
} /* end compare_std_attributes() */
/*-------------------------------------------------------------------------
@@ -979,7 +980,7 @@ error:
*
* 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 @@ error:
*
* 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 @@ error:
H5Tclose(tid);
}
H5E_END_TRY
- return FALSE;
+ return false;
} /* end compare_datasets() */
/*-------------------------------------------------------------------------
@@ -1500,7 +1501,7 @@ error:
*
* 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 @@ error:
* 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 @@ error:
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 @@ error:
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 @@ error:
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 @@ error:
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 @@ error:
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 @@ error:
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 @@ error:
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 @@ error:
*-------------------------------------------------------------------------
*/
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 @@ error:
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 @@ error:
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 @@ error:
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 @@ error:
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 @@ error:
*-------------------------------------------------------------------------
*/
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 @@ error:
*-------------------------------------------------------------------------
*/
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 @@ error:
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 @@ error:
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 @@ error:
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 @@ error:
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 @@ error:
*/
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 @@ error:
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 @@ error:
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 @@ error:
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 @@ error:
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 @@ error:
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 @@ error:
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 @@ done:
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 @@ error:
H5Pclose(dxpl_id);
}
H5E_END_TRY
- return FALSE;
+ return false;
} /* compare_attribute_compound_vlstr() */
@@ -6981,14 +6980,14 @@ error:
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 @@ error:
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 @@ error:
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 @@ error:
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 @@ error:
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 @@ error:
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 @@ error:
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 @@ error:
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 @@ error:
*-------------------------------------------------------------------------
*/
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 @@ error:
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 @@ error:
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 @@ error:
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 @@ error:
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 @@ error:
*-------------------------------------------------------------------------
*/
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 @@ error:
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 @@ error:
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 @@ error:
*/
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 @@ error:
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 @@ error:
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 @@ error:
*-------------------------------------------------------------------------
*/
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 @@ error:
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 @@ error:
*/
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 @@ error:
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 @@ error:
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 @@ error:
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 @@ error:
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 @@ error:
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 @@ error:
*/
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 @@ error:
*-------------------------------------------------------------------------
*/
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 @@ error:
*-------------------------------------------------------------------------
*/
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 @@ error:
*-------------------------------------------------------------------------
*/
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 @@ error:
*-------------------------------------------------------------------------
*/
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 @@ error:
*-------------------------------------------------------------------------
*/
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 @@ error:
*-------------------------------------------------------------------------
*/
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 @@ error:
*-------------------------------------------------------------------------
*/
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 @@ error:
*-------------------------------------------------------------------------
*/
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 @@ error:
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 @@ error:
*/
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 @@ error:
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