summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5tools.c
Commit message (Collapse)AuthorAgeFilesLines
* HDFFV-8611 change h5repack to save the root group creation orderAllen Byrne2017-05-221-0/+4
| | | Added test and new arguments to control the the input file parsing.
* HDFFV-10186 Add endianess to bitfield and fix testsAllen Byrne2017-05-101-1/+1
|
* HDFFV-10186 Whitespace changesAllen Byrne2017-05-091-37/+37
| | | | Mostly replacing tabs with spaces Removed empty mod sections
* 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-47/+41
| | | | | | | | 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-r29889] HDFFV-9775: Add enable-error-stack to tools lib and refactor ↵Allen Byrne2016-05-041-0/+1
| | | | h5repack error handling.
* [svn-r27801] Minor warning fixes in the tools.Dana Robinson2015-09-161-8/+8
| | | | Tested on: jam (too minor for h5committest)
* [svn-r27626] Various minor warning fixes before major SWMR and VDS merges.Dana Robinson2015-08-311-3/+13
| | | | | | | | | | | 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-r27185] fix more instances where both mpi is_initialized and ↵Mohamad Chaarawi2015-06-101-7/+7
| | | | | | is_finalized need to be checked before making any MPI calls. tested with h5committest.
* [svn-r24864] Description:Quincey Koziol2014-03-211-52/+12
| | | | | | | | | | | | | | | | | | Remove all traces of MPI-POSIX VFD and GPFS detection/code. Remove remaining traces of stream VFD. Remove testpar/t_posix_compliant test (it's not actually verifying anything). Clean up H5D__mpio_opt_possible() further. Moved environment variable that disables MPI collective operations into MPI-IO VFD (instead of it being in src/H5S.c). A few other small code cleanups. Tested on: Mac OSX/64 10.9.2 (amazon) w/parallel & serial
* [svn-r24285] Eliminate several "passing argument ... with different width ↵Larry Knox2013-10-101-12/+12
| | | | | | due to prototype" warnings by casting constants to size_t where expected by string functions. Tested on jam, koala,ostrich and platypus with h5committest.
* [svn-r24101] Description:Quincey Koziol2013-09-051-10/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up warnings, enable new compiler warning flag(s) and bring back changes from Coverity branch: r20813: Remove the dead code as listed for coverity bug #1722. h5committested. r20814: Issue 69: Check return value and throw error if negative return. Also free datatype id on error r20815: Use HDstrncpy. --gh r20816: Replaced one last HDstrcat call with HDstrncat to resolve coverity issue 832. r20817: Use HDstrncpy and HDstrncat. --gh r20818: Purpose: Fix valgrind issues with h5jam Description: Modified h5jam to free strings strdup'd in parse_command_line before exit. Note that they may still not be freed in case of error, due to the widespread use of exit(). r20819: Issue 80: change loop to use int as loop index. r20820: Maintenance: Fixed the bug found by coverity CID 788 There were two problems with this function: 1) it tried to unnecessary free NULL pointer 2) it tried to allocate c_name buffer that is done by H5Pget_class_name Tested on: Mac OSX 10.8.4 (amazon) w/gcc 4.8.1, C++ & FORTRAN (too minor to require h5committest)
* [svn-r24011] Description:Quincey Koziol2013-08-151-1/+1
| | | | | | | | Clean up a few warnings Tested on: Mac OSX 10.8.4 (amazon) w/C++ & FORTRAN (too minor to require h5committest)
* [svn-r23953] Update stream handling to allow binary mode - due to unjam fix.Allen Byrne2013-07-311-14/+57
| | | | Tested: local linux
* [svn-r23944] Move stream functions into tools lib.Allen Byrne2013-07-301-5/+219
| | | | Tested: local linux
* [svn-r23695] Description:Quincey Koziol2013-05-111-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up warnings in H5Tconv.c (down to _only_ 9000 lines of output now!) Merge changes from Coverity branch back to trunk: r20684: Fix for coverity bug #1721 which was due to the fix for coverity bug #943. r20685: Use HDstrncpy. --gh r20761: Purpose: Fix valgrind issues Description: Free image_data and data as appropriate in test_image. r20762: Purpose: Fix coverity issue 600 Description: Add check for return value of H5O_close in H5Ocopy. Also cleaned up various warnings. r20763: Purpose: Fix valgrind issues with h5stat Description: Modified h5stat to free "iter" before exit, and free "hand" before exit if parse_command_line exits directly. r20764: fixed coverity issues: 69, 327, 614, 684, 685, 696, 697, 1681, 967, 826, 660, 80 r20765: Fixed coverity bug 668 Pulled x * y * z multiply out of malloc operand into a separate n_elements variable to quiet integer overflow warning. No actual integer overflow tests are performed since it's just a test program but I did add a check that n_elements is >= 1. I also changed an error condition from doing its own close and returning -1 to "goto out;" like the rest of the program. r20766: Fixed coverity bug 667 Pulled x * y * z multiply out of malloc operand into a separate n_elements variable to quiet integer overflow warning. No actual integer overflow tests are performed since it's just a test program. Tested on: Mac OSX/64 10.8.3 (amazon) w/C++ & FORTRAN (h5committest upcoming)
* [svn-r23226] HDFFV-8285: suppress-ddl option: Changed file options to allow ↵Allen Byrne2013-02-041-0/+1
| | | | | | for filename F to be optional. Tested: local linux
* [svn-r23219] Description:Quincey Koziol2013-02-021-33/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bring reviewed changes from Coverity branch back to trunk (QK & JK): r20457: Coverity issue 691: return of H5duo could be negative. Fixed by using STDOUT_FILENO and redesign parse_command_line and main to cleanup file allocations. The output_file var is null when using stdout. In cleanup do not close output_file if NULL. r20510: Initialize ufid = -1 and predicate HDclose call on ufid != -1 r20511: Purpose: Fix coverity issue 1715 Description: Free "file" and nested data on failure in H5FD_core_open. r20512: Initialize ifid = -1 and predicate HDclose call on ifid != -1 r20514: Initialize h5fid = -1 and predicate HDclose call on h5fid != -1 r20516: Added else branch to the if (ret_value < 0) check. r20522: Addressed coverity issues 930-933, 850, 836, 835, 1307. All minor potential buffer overwrite bugs, or coverity errors. Fixed by replacing strcpy and sprintf with strncpy and snprintf. r20523: fixed coverity issues 68, 1120, 1116i r20524: Check H5Z_SZIP->encoder_present < 1 assuming 0 represents absence. r20601: Purpose: Fix coverity issues 1703-1705 Description: Modified the cleanup code in test_free in accum.c to reset allocated buffers to NULL after they are freed, and modified the error cleanup code to check if these buffers are NULL before freeing them. Also fixed some unrelated warnings in accum.c. r20602: Use HDsnprintf and HDstrncat r20603: Purpose: Fix coverity issues 808-809 Description: Modified test_core in vfd.c to check the returns from malloc, and keep track of whether points and check are allocated by setting them to NULL when they are not. Added code to free points and check on error if they are not NULL. Also fixed unrelated warnings in vfd.c. r20604: Use HDstrncpy. r20605: Use HDstrncpy and HDstrncat. r20606: Purpose: Fix coverity issue 807 Description: Modified long_compact in stab.c to keep track of whether objname is allocated by setting it to NULL when it is not. Added code to free objname on error if it is not NULL. r20607: Changed string function calls to use versions that specify the string length to fix coverity issues 832 and 839. Tested on: Mac OSX/64 10.8.2 (amazon) (Too minor to require h5committest)
* [svn-r23216] Add newline for special case of only raw data to stdoutAllen Byrne2013-01-311-2/+7
|
* [svn-r23190] HDFFV-8285: Add suppress ddl option.Allen Byrne2013-01-221-24/+48
| | | | Tested: local linux
* [svn-r23158] HDFFV-8169: h5dump incorrectly dumps a string into a binary fileAllen Byrne2013-01-141-1/+1
| | | | Tested: local linux
* [svn-r22625] HDFFV-8111: h5diff compare file to itself - removed path shortcutAllen Byrne2012-08-031-251/+0
|
* [svn-r22604] cast void* to char* for calculationAllen Byrne2012-07-261-6/+6
| | | | Issue on windows
* [svn-r22602] Allen Byrne2012-07-251-164/+191
|
* [svn-r22411] reduce compiler warnings by removing unreferenced variables and ↵Allen Byrne2012-05-251-4/+5
| | | | | | adding cast Tested: local linux
* [svn-r22087] Minor formatting changes to sync with 1.8Allen Byrne2012-03-191-1/+1
|
* [svn-r22061] Description:Quincey Koziol2012-03-131-1/+1
| | | | | | | | Change to use versioned API call, to avoid problems when defaulting to older AI versions. Tested on: Mac OSX/64 10.7.3 (amazon) w/debug
* [svn-r22042] HDFFV-7957-7958:Allen Byrne2012-03-121-2/+9
| | | | | Add tools error stack and check return from H5Dreference call. Tested: CMake and h5committest
* [svn-r21985] Tools must call h5tools_init before command_line parsing or ↵Allen Byrne2012-02-241-2/+20
| | | | | | | | using tools_mesg functions. Tools library uses alais variables for stdout, stderr and tools library uses HDfprintf() functions. Tested: local linux
* [svn-r21974] Update HSIZE_T print statements to use correct macro.Allen Byrne2012-02-231-5/+5
| | | | | | Fix some more HD prefix issues in tools. Tested: local linux
* [svn-r21971] Correct HD prefixAllen Byrne2012-02-221-1/+1
|
* [svn-r21969] Added missing HD prefixAllen Byrne2012-02-221-134/+135
| | | | Correct indentation
* [svn-r21953] HDDFV-7560: h5dump refactoringAllen Byrne2012-02-171-2636/+30
| | | | Tested: local linux
* [svn-r21952] HDFFV-5874: -c and -k subsettingAllen Byrne2012-02-171-2/+2
| | | | Tested:local linux
* [svn-r21378] The tools used "%hhd" to print signed char. But VMS doesn't ↵Raymond Lu2011-09-131-1/+5
| | | | | | know it. So I used H5_VMS to have a different way ("%hd") to print it. Tested on jam. Not tested on VMS yet. Simple change.
* [svn-r21121] Description:Quincey Koziol2011-07-181-3/+3
| | | | | | | | | Switch from H5P_DATASET_ACCESS_DEFAULT to H5P_DEFAULT for calls to H5Rdereference2(). Tested on: Mac OS X/32 10.6.8 (amazon) w/debug (too minor to require h5committest)
* [svn-r21117] Issue 2763 - I added a new parameter of object access property ↵Raymond Lu2011-07-181-2/+2
| | | | | | list to the function H5Rdereference. It's called H5Rdereference2 now. H5Rdereference function has been deprecated to H5Rdereference1. I also added some test cases in trefer.c. Tested on jam, heiwa, and koala.
* [svn-r20796] Refactor print_data_region_blocks/ponts to remove context ↵Allen Byrne2011-05-111-53/+83
| | | | | | | | passed in by value. The print functions needed an independent context with only the current indent level passed in by argument. Also synched the two routines logical flows and corrected a mem_space error. h5dump (and h5stat, h5jam/h5unjam) help option not tested. Added h5dump parse_command_line technique for h5stat and h5jam/unjam and created testfiles. Tested: local linux
* [svn-r20785] Revert region data print changes from yesterdayAllen Byrne2011-05-101-60/+50
|
* [svn-r20783] correct type of variable for blkindxAllen Byrne2011-05-091-4/+4
|
* [svn-r20781] correct typo of variable types for indx and jndxAllen Byrne2011-05-091-2/+2
|
* [svn-r20776] Refactor print_data_region_blocks/ponts to remove context ↵Allen Byrne2011-05-091-44/+54
| | | | | | passed in by value. The print functions needed an independent context with only the current indent level passed in by argument. Also synched the two routines logical flows and corrected a mem_space error. Tested: local linux
* [svn-r20725] Add overlooked changes from part of coverity fixAllen Byrne2011-05-041-2/+7
| | | | Tested: local linux
* [svn-r20713] Packed Bits Merge:Allen Byrne2011-05-031-8/+6
| | | | | | | | | removed option defines and #ifdef/#endif refactored all printf to HDfprintf in h5dump.c formatted and indention improvements synched with 1.8 branch Tested: local linux
* [svn-r20677] Merge packed bits option from 1.8 branch to trunk. CMake only. ↵Allen Byrne2011-04-291-0/+5
| | | | | | Autotools merge to come. Tested: local Linux
* [svn-r20676] Purpose:Jonathan Kim2011-04-291-7/+49
| | | | | | | | | | | | | | | | - HDFFV-5928 - GMQS: h5diff problem and improvement on comparsing the same objects Description: Fixed: 1) adding h5tools_is_obj_same() function to check if two given IDs or paths point to the same object. This function can be very useful for other tools and applications. 2) using h5tools_is_obj_same() at h5diff() and diff() in h5diff.c. If two paths point to the same object, there is no need to check the details of the object since we know there is no difference. The fix will increase the performance by skipping the content comparison. It also fixed the problem of reporting difference for some cases of comparing the same file, e.g. empty files or files with incomparable objects the same file. Test update: Updat prvious test cases (171, 172, 530) affected by this fix, so they still perfrom originally intended testing without bypassing. Tested: jam (linux32-LE), koala (linux64-LE), heiwa (linuxppc64-BE), tejeda (mac32-LE), linew (solaris-BE), cmake
* [svn-r20626] Albert's test on bp reveals that the dumper had assertion ↵Raymond Lu2011-04-251-2/+6
| | | | | | | | failure when it tried to display empty attribute data. I added a check for empty attribute in h5dump.c. I also added a check for empty dataset in tools/lib/h5tools.c. Tested on jam. But I tested the same changes in 1.8 on jam, linew, and amani.
* [svn-r20539] Description:Quincey Koziol2011-04-181-38/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bring Coverity changes back to trunk: r20276: Add recursive is vlen string function. Cleanup resource leaks for issues: 200,202,329,688,811,812 r20277: Check types and close by adding error section: issue 687 r20278: Replaced implicit pointer conversion with (ocrt_info.new_obj != NULL). r20280: Addressed coverity issues 927-929 & 583. The real issue is failure to check file name length -- at least at the H5FD interface level. This needs more work, but at least I have dealt with the issue in H5FDfamily.c r20337: H5O_type_t obj_type = H5O_TYPE_UNKNOWN; r20338: Added udata.name = NULL; to prevent potential uninitialized use after done: label. r20339: coverity issues: 686,828,1670-1673,1707-1711 Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode FreeBSD/32 8.2 (loyalty) w/gcc4.6, in debug mode FreeBSD/64 8.2 (freedom) w/gcc4.6, 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-amd64 2.6 (abe) w/parallel, w/FORTRAN, in debug mode
* [svn-r20480] Description:Quincey Koziol2011-04-121-4/+10
| | | | | | | | | | | Remove global variable for the path name in the group traversal code. Also clean up a bunch of compiler warnings. Tested on: Mac OS X/32 10.6.7 (amazon) w/debug & production FreeBSD/32 6.3 (duty) w/debug FreeBSD/64 6.3 (liberty) w/debug Solaris/32 2.7 (linew) w/debug
* [svn-r20285] Purpose:Jonathan Kim2011-03-211-49/+66
| | | | | | | | | | | | | | | | | Improve the previous fix for Bug 2216 - GMQS: h5diff - memory leak when compares vlen string in dataset or attributes Description: Related to the previous checkin r20270 and r20266. Improve h5tools_detect_vlen() code for better performance. H5Tdetect_class already recusive on given type so don't need to be part of recusive call again. Also improve error handlings in h5tools_detect_vlen and h5tools_detect_vlen_str functions. Also updated h5ls and h5dump code accordingly. Tested: jam (linux32-LE), amani (linux64-LE), heiwa (linuxppc64-BE), tejeda (mac32-LE), linew (solaris-BE), Cmake - jam