summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5tools_utils.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge hdf5 1 10 8 (#1154)hdf5-1_10_8Larry Knox2021-10-291-354/+167
| | | Merge HDF5 1.10.8 release files to 1.10/master
* Brings tools VFD changes from hdf5_1_10Dana Robinson2020-08-251-111/+26
|
* Merge from dev of tools changesAllen Byrne2020-07-221-57/+104
|
* Merge CMake and tools changes from developAllen Byrne2020-02-271-17/+17
|
* Merge S3 code from develop to 1.10Allen Byrne2019-09-131-1/+484
|
* Cleanup when merging to other branchesAllen Byrne2019-07-301-13/+13
|
* Fixed HDFFV-10578Binh-Minh Ribler2019-01-151-1/+16
| | | | | | | | | | | Description: - HDFFV-10578 - CVE-2018-17234 Memory leak in H5O__chunk_deserialize() Actually, the leak was in h5tools_util. Applied Neil's fix. - Changed an assert to if/HGOTO_ERROR to fail gracefully. Platforms tested: Linux/64 (jelly) Linux/64 (platypus) Darwin (osx1010test)
* Changes made based on feedback from pull request #1039.Vailin Choi2018-05-141-3/+3
|
* Fix for HDFFV-10180 Performance issues with H5Oget_info.Vailin Choi2018-04-241-3/+3
|
* HDFFV-10297 Cleanup, Initialize variablesAllen Byrne2017-10-231-3/+2
|
* Windows had issues - revert code changes for get_optionAllen Byrne2017-10-191-4/+8
|
* HDFFV-10296 Update tools lib to use the error handling macros.Allen Byrne2017-10-131-166/+65
|
* HDFFV-10282 refactor out assert calls in toolsAllen Byrne2017-08-231-3/+5
|
* Stripped C standard library headers (and a couple of macros)Dana Robinson2017-07-171-10/+0
| | | | | from the tools code. This is all handled in H5private.h, which should be included in all tools source files.
* Merge pull request #426 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:hdf5_1_10 to ↵Larry Knox2017-04-251-6/+4
| | | | | | | | | | hdf5_1_10 * commit '54957d37f5aa73912763dbb6e308555e863c43f4': Commit copyright header change for src/H5PLpkg.c which was added after running script to make changes. Add new files in release_docs to MANIFEST. Cimmit changes to Makefile.in(s) and H5PL.c that resulted from running autogen.sh. Merge pull request #407 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:hdf5_1_10_1 to hdf5_1_10_1 Change copyright headers to replace url referring to file to be removed and replace it with new url for COPYING file.
* [svn-r30113] Description:Quincey Koziol2016-06-281-14/+16
| | | | | | | | Clean up warnings (from 2774 -> 1560, with my standard debug build) Tested on: MacOSX/64 10.11.5 (amazon) w/serial, parallel & production (h5committest forthcoming)
* [svn-r29222] HDFFV-9570: Fix segfault when optional args are last option on ↵Allen Byrne2016-02-281-23/+28
| | | | | | command line. Tested: java_merge DT
* [svn-r27626] Various minor warning fixes before major SWMR and VDS merges.Dana Robinson2015-08-311-0/+3
| | | | | | | | | | | gcc 4.9.2 was used to create the warning list - implicit casts - shadowed variables - various enum issues - other minor fixes (comments, unused macros, etc.) Tested on: h5committest
* [svn-r26635] Description:Quincey Koziol2015-03-281-18/+1
| | | | | | | | | | | Bring r26651 from autotools_rework branch to trunk: Remove the VSNPRINTF_WORKS macro, it's working around bugs in old SGI & HP compilers. Tested on: Linux/32 2.6.18 (jam) w/serial & parallel (Daily tested on branch for 2+ days)
* [svn-r23226] HDFFV-8285: suppress-ddl option: Changed file options to allow ↵Allen Byrne2013-02-041-0/+2
| | | | | | for filename F to be optional. Tested: local linux
* [svn-r23190] HDFFV-8285: Add suppress ddl option.Allen Byrne2013-01-221-8/+10
| | | | Tested: local linux
* [svn-r22625] HDFFV-8111: h5diff compare file to itself - removed path shortcutAllen Byrne2012-08-031-0/+2
|
* [svn-r22012] Purpose:Jonathan Kim2012-03-011-2/+2
| | | | | | | | | | | | | | | | Task for HDFFV-7862 - Select data by chunk direction to improve performance in h5repack Description: h5repack sometimes became very slow when handling big chunked datasets in certain cases. (when chunk boundary doesn't match with a hyperslab boundary.) The main issue was from figuring out a hypeslab without considering chunk boundary to read from and write to such datasets. The update was made to figure out a better hyperslab unit with considering chunk boundary to improve performance for such cases prior to the update. Tested: jam (linux32-LE), koala (linux64-LE), ostrich (linuxppc64-BE), tejeda (mac32-LE), linew (solaris-BE), Windows
* [svn-r21985] Tools must call h5tools_init before command_line parsing or ↵Allen Byrne2012-02-241-18/+21
| | | | | | | | using tools_mesg functions. Tools library uses alais variables for stdout, stderr and tools library uses HDfprintf() functions. Tested: local linux
* [svn-r21982] Correct HD prefix in tools for exitAllen Byrne2012-02-241-1/+1
| | | | Checked for HD support.
* [svn-r21969] Added missing HD prefixAllen Byrne2012-02-221-66/+58
| | | | Correct indentation
* [svn-r21953] HDDFV-7560: h5dump refactoringAllen Byrne2012-02-171-3/+2
| | | | Tested: local linux
* [svn-r21586] Description:Jonathan Kim2011-10-141-0/+52
| | | | | | | | | Added a funtion to reset dataset & hyperslab buffer size for h5repack from an environment variable. This is performance debugging purpose for now. Tested: jam (linux32-LE), koala (linux64-LE), heiwa (linuxppc64-BE), tejeda (mac32-LE), Windows (32-LE), cmake
* [svn-r21236] Purpose:Jonathan Kim2011-08-161-0/+18
| | | | | | | | | | | | | | | | | | | | Work for: HDFFV-7515 - GMQS: h5unjam - incorrect help page and should display when no file is given. and HDFFV-5941 - h5jam: specifying a user block file with a proper HDF5 magic number will result in a corrupted HDF5 file. Description: - Revised command help pages of h5jam and h5unjam. The descriptions were not up to date and some were missing. (HDFFV-7515) - Fixed h5jam not to allow specifying an HDF5 formatted file as input file for -u (user block file) option, because the original HDF5 file will not be accessible if allows. (HDFFV-5941) Tested: jam (linux32-LE), koala (linux64-LE), heiwa (linuxppc64-BE), tejeda (mac32-LE), linew (solaris-BE), Cmake (jam, Wondows)
* [svn-r20885] Description:Quincey Koziol2011-05-201-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bring Coverity changes back to trunk: r20340: Address coverity issue 248. Set freed pointer to NULL if realloc fails, then check for NULL before attempting to close array of handles stored in memory addressed by pointer. r20341: Added initialization udata.path = NULL; udata.visited = NULL; to prevent unintialized use after done: label. Do C-style initialization AFTER all variable definitions. r20342: Fix valgrind error in H5DUMP-XML-tall.h5 r20343: Addressed Coverity issue 591 - check the return value of H5S_SELECT_ITER_RELEASE. r20344: Added initialization udata.path = NULL; to prevent uninitialized used after done: label r20347: Purpose: Fix memory leak in overhead.c Description: Fixed leak in test() in overhead.c where array "had" was never freed. r20348: Addressed Coverity issue 705 - added prototype for resize_configs_are_equal to cache_common.h. r20392: Purpose: Fix coverity issues 1677 and 1678 Description: Added return value checking for 4 funciton calls in H5tools_get_symlink_info(). r20394: Purpose: Fix coverity issues 1674 and 1675 Description: Modified H5Epush2() and H5E_printf_stack() to keep track of whether va_start() has been called, and to call va_end() at the end if so. r20395: Should be H5MM_calloc(count * sizeof(void*)). Fixed --gh r20396: Should be H5MM_calloc(count * sizeof(void*)). Fixed. --gh Tested on: Mac OSX/32 10.6.7 (amazon) w/debug & production (h5committested on branch)
* [svn-r20536] Description:Quincey Koziol2011-04-171-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up various warnings & code formatting issues. Bring changes from Coverity branch to trunk: r20085: Purpose: Fix coverity issue 793 Description: Modified H5S_hyper_project_simple_higher() to free the entire span list in new_space on failure. r20091: This is a fix for coverity bug #1683. Changed the two printfs to use %lu (unsigned long) for printing "dset_size". r20162: Purpose: Fix coverity issue 785 Description: Modified H5T_enum_nameof() to free "name" on failure if it was allocated. Also clarified some code in H5S_hyper_rebuild_helper(). r20189: Addressed coverity defect 783. H5SL_new_node() in H5SL.c was failing to free space allocated in its first alloc if the second alloc failed. Added a call to H5FL_FREE to address this issue. This is purely to keep coverity happy -- if this code is ever triggered, we have much larger problems. Note that this fix will trigger an unused return value complaint from coverity next week. r20190: Fixed Coverity issues 1561 1565 and 1678 (UNUSED_VALUES) by moving checks of return values to after the function call. r20191: Fixed coverity issues 643 644 and 1678 (CHECKED_RETURN). r20232: Addressed coverity issues 923-925. Replaced calls to sprintf with calls to HDsnprintf. r20233: Fix coverity issue 662. Don't try to sort 0 attributes in H5Aint.c. r20234: Fix coverity issue 664. Check for NULL before dereferencing in H5Gdeprec.c. r20271: Purpose: Fix coverity issue 784 Description: Modified H5_debug_mask() to keep a list of files opened for use as a debugging output stream, and modified H5_term_library to close these files on exit. r20272: addressed coverity issues 838 & 955. Issue was use of strcpy() -- existing code was safe, but modified to use strncpy() to keep coverity happy. r20273: Addresed coverity issues 1388 and 1389. Initialized sel_iter->type to NULL in H5S_select_iter_init. r20275: Purpose: Fix valgrind issue in mf.c Description: Fixed bug (incomplete if statement) in test_mf_fs_alloc_free() so the retrieved node gets freed. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, w/threadsafe, in production mode Linux/PPC 2.6 (heiwa) w/C++ & FORTRAN, w/threadsafe, in debug mode
* [svn-r20294] Purpose:Jonathan Kim2011-03-221-2/+5
| | | | | | | | | | | | | | | | Fixed CHICAGO: Bug 2121 - h5diff - incorrect and lack of output for the different set of attributes (different number and names) Description: Previously h5diff compared attributes correctly only when two objects have the same number of attributes and attribute names are identical. This fix covers all other cases. Also didn't display useful information about attribute difference. This fixes both issues. Tested: jam (linux32-LE), amani (linux64-LE), heiwa (linuxppc64-BE), tejeda (mac32-LE), linew (solaris-BE)
* [svn-r19400] Purpose:Jonathan Kim2010-09-161-4/+12
| | | | | | | | | | Fix for Bug1975 h5diff - support recursive comparison on group when specified as an object Description: Compare member objects and groups recursively when two files or groups are specified to be compared. Support parallel diff and handling symbolic links accordingly. Tested: jam, amani, heiwa
* [svn-r19292] Description:Quincey Koziol2010-08-241-31/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge r19290 & r19291 from 1.8 branch to trunk: r19290: Correct another error in metadata accumulator dirty region calculations (this time with a corner case when freeing data in the file). r19291: Avoid getting object information for soft/external links if we aren't going to traverse across the link itself. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, w/threadsafe, in production mode Linux/PPC 2.6 (heiwa) w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in debug mode Mac OS X/32 10.6.4 (amazon) in debug mode Mac OS X/32 10.6.4 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode Mac OS X/32 10.6.4 (amazon) w/parallel, in debug mode
* [svn-r19252] Description:Quincey Koziol2010-08-191-4/+76
| | | | | | | | | | | | | | | | | | | | | | | Bring Coverity changes from branch to trunk: r19161: Fixed the part for matching the subset info with dataset r19189: BZ1646: h5dump does not check number of dimensions for subsetting parameters against the dataset Changed subset_t structure from holding hsize_t pointers to holding new subset_d pointers, which hold the original hsize_t pointer + len. this len is then checked against dataset ndims in the handle_dataset function of h5dump. Changed all references to use new data structure. Added tests for each subset parameter. r19190: Added new h5dump ddl files Tested on: Mac OS X/32 10.6.4 (amazon) w/debug & production (h5committested on branch)
* [svn-r19153] Description:Quincey Koziol2010-07-291-43/+34
| | | | | | | | | | | | | | | | | | | | | | | | Bring changes on Coverity branch back to trunk: r19040: Fixed coverity #440 - NULL check after dereference. We moved the NULL check up into the IF block and changed it to assertion. r19041: Maintenance: Addressed Coverity issues 441 and 449 by initializing proper variables r19042: In function H5O_chunk_protect (H5Ochunk.c): - Initialize H5O_chunk_proxy_t pointers chk_proxy and ret_value. - Free chk_proxy on error. r19043: Addressed coverity issues 442 - 448 by initializing pointers to NULL. Tested on: Mac OS X/32 10.6.4 (amazon) w/debug & production (Too minor to require h5committest)
* [svn-r19051] Purpose:Jonathan Kim2010-07-071-6/+5
| | | | | | | | | | | Add --no-dangling-links option to h5ls. Description: Related to "Bug 1830 - Following an dangling external link in h5ls should set non-zero return code." If --no-dangling-links option is specified and any dangling link is found, return exit code 1 (error). Tested: jam, amani and heiwa
* [svn-r18816] Move progname and d_status functions from h5tools to h5tools_utilAllen Byrne2010-05-141-0/+30
| | | | | Tested: linux and windows
* [svn-r18759] pull r18757 from 1.8 branchAllen Byrne2010-05-111-4/+4
| | | | | | | | | Enable tools lib to be built as a dll on windows. Added two get/set functions for progname and d_status. Also add windows import/export declarations to functions. Updated error_mesg() and warn_mesg() to remove progname argument and use get functions Tested: Windows, linux
* [svn-r18614] Purpose:Jonathan Kim2010-04-221-0/+132
| | | | | | | | Fix for bug 1817 : h5copy fail to copy dangling link by specifying link path directly Tested: jam, amani, linew
* [svn-r18548] Description:Quincey Koziol2010-04-131-1/+1
| | | | | | | Minor cleanups to compile with PGI C compiler 10.x. Tested on: Linux 2.4/32 (jam) w/PGI 10.x C and F90 compilers
* [svn-r18197] Description:Quincey Koziol2010-01-301-6/+6
| | | | | | | | | Trim trailing whitespace from source code files with this command: find . \( -name "*.[ch]" -or -name "*.cpp" -or -name "*.f90" \) -print |xargs -n 1 sed -i "" 's/[[:blank:]]*$//' Tested on: None - eyeballed only
* [svn-r15991] Merge with 1.8 rev 15969Pedro Vicente Nunes2008-10-291-2/+25
| | | | | | | | | | | | | | | Introduced a new feature in the tools library regarding command line parsing In the definition of arguments, an "*" means that the switch can or can not have an optional argument. This "*" is put in the code regarding the letter definition, and it is transparent to the user (e.g b* instead of the previous b: ), where ":" notes a required argument after the letter (and no ":" or "*" notes no argument, mandatory) Used for the h5dump binary option -b It can be now 1) -b (defaults to NATIVE) 2) - b NATIVE 3) - b FILE 4) -b LE 5) -b BE Note: the keyword NATIVE replaces MEMORY This feature (-b with no argument) was tested with the sequence of h5dump to binary (NATIVE) then h5import to generate an HDF5 file from the binary file and h5diff to compare the 2 HDF5 files Tested: linux
* [svn-r15886] Purpose: Close bug 1332Neil Fortner2008-10-161-14/+14
| | | | | | | | | Description: Improved external link traversal of h5dump. h5dump will now properly avoid all cycles, even those spanning multiple files. Improvement to the output of committed datatypes. Committed datatypes are now checked for uniqueness (like other objects). Tests added for these cases. Tested: kagiso, linew, smirom (h5committest)
* [svn-r15183] Purpose: _WIN32 macro cleanupScott Wegner2008-06-091-5/+0
| | | | | | | | | | Description: As part of our Windows cleanup, we try to remove windows-specific tweaks in the source code. There are many instances where Windows code is introduces via ifdef's. We re-evaluate whether they are still required, and found that many of them are not. Others we change to "feature"-specific code, rather than Windows-specific. Tested: VS2005 on WinXP VS.NET on WinXP h5committest (kagisopp, smirom, linew)
* [svn-r14284] Description:Quincey Koziol2007-11-241-127/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add H5Lvisit_by_name() API routine to library. Eliminated all (five!) other group traversal routines and changed them all to use the new API routine. Cleaned up output of h5ls & h5stat: - Issue error when requesting recursive traversal of a file with the "group info" flag, but no group given - Print info about root group in all(?) appropriate situations - Don't print "verbose" information about root group until the root group is in the list of objects to display (mostly because h5ls & h5stat had a different twist on traversing the groups in a file that the other utilities) Tested on: FreeBSD/32 6.2 (duty) in debug mode FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Mac OS X/32 10.4.10 (amazon) in debug mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
* [svn-r14225] Description:Quincey Koziol2007-10-311-3/+3
| | | | | | | | | | | | | | | | | | | Change H5Oget_info -> H5Oget_info_by_name and re-add H5Oget_info in a simpler form for querying a particular object, to align with other new API routines. Tested on: FreeBSD/32 6.2 (duty) in debug mode FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Mac OS X/32 10.4.10 (amazon) in debug mode
* [svn-r14224] Description:Quincey Koziol2007-10-301-2/+2
| | | | | | | | | | | | | | | | | | | Change H5Literate -> H5Literate_by_name and add simpler form of H5Literate, to bring this routine into alignment with the other new API routines. Tested on: FreeBSD/32 6.2 (duty) in debug mode FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Mac OS X/32 10.4.10 (amazon) in debug mode
* [svn-r14193] Description:Quincey Koziol2007-10-081-2/+2
| | | | | | | | | | | | | | | | | | | Make H5Dopen versioned and change all internal usage to use H5Dopen2 Add simple regression test for H5Dopen1 Tested on: FreeBSD/32 6.2 (duty) in debug mode FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Mac OS X/32 10.4.10 (amazon) in debug mode
* [svn-r14144] Description:Quincey Koziol2007-09-131-43/+30
| | | | | | | | | | | | | | | | Move H5Gget_objinfo() to deprecated symbols section and retarget internal usage to H5Lget_info()/H5Oget_info(). Misc. other code cleanups... Tested on: FreeBSD/32 6.2 (duty) FreeBSD/64 6.2 (liberty) Linux/32 2.6 (kagiso) Linux/64 2.6 (smirom) AIX/32 5.3 (copper) Solaris/32 2.10 (linew) Mac OS X/32 10.4.10 (amazon)