Commit Graph

29 Commits

Author SHA1 Message Date
Dana Robinson
aa4fc58ac9 [svn-r28599] Normalization of tools with revise_chunks.
Tested on: 64-bit Ubuntu 15.10 (Linux 4.2.0 x86_64) gcc 5.2.1
           serial only, autotools and CMake (3.3.2)
2015-12-11 14:14:43 -05:00
Quincey Koziol
5b876c929f [svn-r24101] Description:
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)
2013-09-05 15:44:14 -05:00
Allen Byrne
eb5b8163f9 [svn-r22411] reduce compiler warnings by removing unreferenced variables and adding cast
Tested: local linux
2012-05-25 12:39:07 -05:00
Allen Byrne
df6c92e506 [svn-r22004] Reduced warnings and fixed conflicts resulting from including h5tools.h
Tested: local linux
2012-02-28 13:26:34 -05:00
Allen Byrne
202c36682b [svn-r21985] Tools must call h5tools_init before command_line parsing or using tools_mesg functions.
Tools library uses alais variables for stdout, stderr and tools library uses HDfprintf() functions.

Tested: local linux
2012-02-24 16:14:47 -05:00
Allen Byrne
827cbbba31 [svn-r21982] Correct HD prefix in tools for exit
Checked for HD support.
2012-02-24 10:45:54 -05:00
Jonathan Kim
e703a6a2a4 [svn-r21236] Purpose:
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)
2011-08-16 15:41:47 -05:00
Allen Byrne
f49dc38127 [svn-r20796] Refactor print_data_region_blocks/ponts to remove context 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
2011-05-11 15:45:54 -05:00
Allen Byrne
b2120ac993 [svn-r20310] Change incorrect use of "struct stat" to use "h5_stat_t". On windows, this used the wrong structure and caused crashes. Also removed includes from top of file - they are included with proper config checks in h5private.h.
Tested: local linux, windows
2011-03-24 10:32:58 -05:00
Quincey Koziol
575469a6a7 [svn-r20065] Description:
Bring changes from Coverity branch to trunk:

r19975:
Fixed potential mem leak at H5O_attr_open_by_name

r19980:
Fix coverity issue 792.
Free tmp_env_prefix in H5Lexternal.c line 365 if it is not NULL but its contents are 0 when it goes out of scope.

r20039:
Eliminate warnings about nested extern and implicit declarations of parallel_print and address Coverity defects 712-781 by #including h5tools_utils.h in h5diff_array.c, h5diff_attr.c, h5diff_dset.c and h5diff_util.c.

r20046:
Purpose: Address TOCTOU warnings in h5jam and h5unjam

Description: Coverity is afraid that the state of the input file could change
between the call to stat() and the call to open().  This is called a time-of-
check time-of-use (TOCTOU) vulnerability.  Modified stat calls to fstat which
uses an open file pointer so it (hopefully) won't complain any more.

r20047:
Addressed coverity issues 135-137, 462-464.  Local pointers that needed to be freed in case of error were moved out of a switch statement in src/H5Tnative.c, set to NULL, and checked before freeing.

Tested on:
    Mac OS X/32 10.6.6 (amazon) w/debug & production
    (h5committested on Coverity branch)
2011-02-08 16:35:54 -05:00
Raymond Lu
1c61b6fe13 [svn-r19481] I'm backing out my fix for bug 1707 because there're some unresolved issues - r19441 and 19467.
Bug 1707 is that H5Eset_auto causes a seg fault when an application uses -DH5_USE_16_API with 
the 1.8 library to compile.  

I created a branch off the trunk called set_auto to continue working on the problem.

Tested on jam - backing out, simple.
2010-09-27 14:02:48 -05:00
Raymond Lu
d6c6a34a8f [svn-r19457] Bug fix for 1707 - H5Eset_auto causes a seg fault when an application uses -DH5_USE_16_API with the 1.8 library to compile. The cause is from the mismatch of H5Eprint1 and H5Eprint2 set
through H5Eset_auto.  I changed the union in the structure H5E_auto_t.  Another change is to 
make H5Eget_auto fail if H5Eset_auto is called to set the printing function.  I'll write a 
document for it.

Tested on heiwa, jam, and amani.

The property change in configure.in, config, and Makefile.am came from the merge of the 1.8 
library change.
2010-09-21 11:46:38 -05:00
Allen Byrne
68fa42f336 [svn-r18759] pull r18757 from 1.8 branch
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
2010-05-11 15:10:25 -05:00
Albert Cheng
f40a245ce2 [svn-r18055] Bug fix: 1192
Description:
Fixed exit code (sometimes return code in Main) to follow the HDF5 standards.

Tested:
H5committested plus serial test in Jam.
2009-12-26 03:36:37 -05:00
Scott Wegner
532e23b808 [svn-r15150] Purpose: Separate Windows function macro definitions to win32defs.h
Description:
In library code, we try not to use system calls directly, but instead use the HD{function} macro instead.  This way, we can map special versions of the call on particular systems.  Previously, it was all done in H5private.h.  However, in an effort to clean up platform-specific definitions, we move all of the Windows macros into a separate file, win32defs.h.  This way, we can use the non-Posix versions that Visual Studio sends warnings about.

Some macros are set specifically in the platform-specific header files.  Then, any macros left unset will be set by the "default" implementation in H5private.h.

This checkin also cleans up various source files to use the HD* macros when possible.

Tested:
VS2005 on WinXP
VS.NET on WinXP
h5committest (kagiso, linew, smirom)
2008-06-05 13:52:19 -05:00
Pedro Vicente Nunes
579bb24307 [svn-r14233] new feature: add the -V new option to the usage message
tested: windows, linux
2007-11-01 16:23:28 -05:00
Pedro Vicente Nunes
5a95f84df8 [svn-r14232] new feature: add a -V option to h5jam
tested: windows, linux
2007-11-01 15:58:04 -05:00
Pedro Vicente Nunes
de3bba16d3 [svn-r14231] new feature: add a -V version option to h5jam
tested: windows, linux
2007-11-01 15:43:43 -05:00
Quincey Koziol
d6bb18abbc [svn-r13648] Description:
Rename new error handling API routines from H5E<foo>_stack() to
H5E<foo>2().

Tested on:
    Mac OS X/32 10.4.9 (amazon)
    FreeBSD/32 6.2 (duty)
    FreeBSD/64 6.2 (liberty)
2007-04-11 20:59:45 -05:00
Albert Cheng
ed7d456e51 [svn-r13253] Updated all C and C++ style source code files with the THG copyright notice.
Tested platform:
Kagiso only since it is only a comment block change.  If it works in one
machine, it should work in all, I hope.  Still need to check the parallel
build on copper.
2007-02-07 09:56:24 -05:00
James Laird
3e755623cb [svn-r12528] Added User-Defined links to the library.
Users can create external links using H5L_create_external().  These links
point to an object in another HDF5 file.  Users can alter the behavior of
external links or create new kinds of links by registering callbacks
using the H5L interface.

Added tests, tools support, etc.

Also a number of other, minor changes have been made (some restructuring of
the H5L interface, for instance).

Additional documentation and examples are forthcoming.
2006-08-02 18:41:53 -05:00
Quincey Koziol
6b45f5172c [svn-r11245] Purpose:
Code cleanup

Description:
    Trim trailing whitespace, which is making 'diff'ing the two branches
difficult.

Solution:
    Ran this script in each directory:

foreach f (*.[ch] *.cpp)
    sed 's/[[:blank:]]*$//' $f > sed.out && mv sed.out $f
end


Platforms tested:
    FreeBSD 4.11 (sleipnir)
    Too minor to require h5committest
2005-08-13 15:53:35 -05:00
Elena Pourmal
c5e8dc74c5 [svn-r10220] Purpose: Minor bug fix
Description: h5jam and h5unjam used old names jam and unjam while
             printing help message

Solution: fixed

Platforms tested: heping

Misc. update:
2005-03-15 15:14:24 -05:00
Quincey Koziol
427ff7da28 [svn-r9727] Purpose:
Bug Fix/Code Cleanup/Doc Cleanup/Optimization/Branch Sync :-)

Description:
    Generally speaking, this is the "signed->unsigned" change to selections.
However, in the process of merging code back, things got stickier and stickier
until I ended up doing a big "sync the two branches up" operation.  So... I
brought back all the "infrastructure" fixes from the development branch to the
release branch (which I think were actually making some improvement in
performance) as well as fixed several bugs which had been fixed in one branch,
but not the other.

    I've also tagged the repository before making this checkin with the label
"before_signed_unsigned_changes".

Platforms tested:
    FreeBSD 4.10 (sleipnir) w/parallel & fphdf5
    FreeBSD 4.10 (sleipnir) w/threadsafe
    FreeBSD 4.10 (sleipnir) w/backward compatibility
    Solaris 2.7 (arabica) w/"purify options"
    Solaris 2.8 (sol) w/FORTRAN & C++
    AIX 5.x (copper) w/parallel & FORTRAN
    IRIX64 6.5 (modi4) w/FORTRAN
    Linux 2.4 (heping) w/FORTRAN & C++


Misc. update:
2004-12-29 09:26:20 -05:00
Quincey Koziol
eb3e9ccd8a [svn-r9234] Purpose:
Code cleanup

Description:
    Tweak recent "forward compatibility" changes to the H5E* API (which allowed
for the old H5E API functions to remain unchanged) by allowing for the error
stack callback function (H5E_auto_t) to also remain unchanged from the 1.6
branch.  This required changing the H5E{get|set}_auto routines to have the
old style H5E_auto_t type (which didn't have a stack ID parameter) and the new
H5E{get|set}_auto_stack routines to have a newer "H5E_auto_stack_t" type (which
has a stack ID parameter).  This should make the H5E API changes as forwardly
compatible as possible.
    One side-affect of this change was that it was impossible to determine if
the current auto error callback was the old style (H5E_auto_t) or the new style
(H5E_auto_stack_t) of callback, so a new API function (H5Eauto_is_stack) was
adde to query this.

Platforms tested:
    FreeBSD 4.10 (sleipnir)
    IRIX64 6.5 (modi4)
    h5committest
2004-09-08 21:37:02 -05:00
Raymond Lu
cb7f03a26f [svn-r9183] Purpose: New feature
Description:  Restore 6 old error API functions back to the library to be backward
compatible with v1.6.  They are H5Epush, H5Eprint, H5Ewalk, H5Eclear, H5Eset_auto,
H5Eget_auto.  These functions do not have error stack  as parameter.

Solution:  Internally, these functions use default error stack.

Platforms tested:  h5committest and fuss.

Misc. update: RELEASE.txt
2004-09-01 12:43:30 -05:00
Xuan Bai
ee21dce85c [svn-r9110] Purpose:
Update.

Description:
Make some minor change so that h5jam.c is compatible with Windows.

Solution:
1. unistd.h is not available in windows system.  Add a macro for this header file as:
   #ifdef H5_HAVE_UNISTD_H
   #include <unistd.h>
   #endif
2. Change open, read, write, lseek functions to HDopen, HDread, HDwrite, and HDlseek,
   as these HD functions are more comtatible with Windows system.
3. add #include H5private.h
4. remove #include <stdlib.h>

Platforms tested:
Windows 2000
Windows XP
eirene
(Note:  I talked with Bob and Kent about these changes before check-in)


Misc. update:
2004-08-18 17:00:55 -05:00
Quincey Koziol
e599638365 [svn-r9036] Purpose:
Bug fix

Description:
    Correct compilation errors w/--enable-hdf5_v1_6 and using the C++ compiler
as a C compiler

Platforms tested:
    FreeBSD 4.10 (sleipnir) w/above flags
    Not tested with h5committest
2004-08-06 12:52:06 -05:00
Robert E. McGrath
f53299c0b3 [svn-r9019] Purpose:
Adding new 'jam' utility

Description:
New utility, plus changes to makefiles

Solution:
See http://hdf.ncsa.uiuc.edu/RFC/Jam

Platforms tested:
verbena (fortran,C++), arabica, hirdls (SGI Irix64)

Misc. update:
Manifest will be done in next checkin.
2004-08-05 10:10:39 -05:00