Bug fix
Description:
Attempted to close rawdatastream even if it has not been
used to open a new file. Many systems tolerated the NULL
value but not FreeBSD.
Solution:
Check for the NULL value too.
Platforms tested:
hawkwind (freeBSD) and modi4 parallel.
New Feature
Description:
Add -o option to h5dumper. It displays the raw data of datasets to a
separate output file.
Add a feature to h5tools library that it uses the FILE *rawdatastream
as the stream for the display of datasets raw data.
Solution:
Define an "extern FILE *rawdatastream" in h5tools.h
and declare it in h5tools.c. This way, it would work
even if an application does not explicitely declare it.
Tried to initialized it to stdout as
FILE *rawdatastream = stdout;
but Linux gcc rejected it though all other platforms+compilers
accepted it fine. For now, put in a kludge to set it right
before it is used. Need a safer way to initialize it.
Platforms tested:
arabica, eirene, modi4 -64.
Reformat the source
Description:
The tabstop seems to defined different from 8-stops. The
source files looked very confusing. Just reformate the
files. Not change to source code at all.
Platforms tested:
modi4 -64.
1. The `driver' table is initialized only once, making it faster and
leaking less memory.
2. The returned driver name is set to the empty string on failure.
3. Added an argument so the function cannot overwrite the end of the
drivername return value.
4. Avoids core dump when assigning driver name to return value if the
file could not be opened by any driver.
5. Changed name of function to h5dump_fopen() to follow the naming
scheme for this source file.
6. Reindented according to hdf5 code standard.
7. Added `const' qualifiers to read-only formals.
8. Removed duplicate forward declaration.
Reindented some parts of these source files that had very odd indentation
(some lines had no indentation while others had 3x what they should).
Fixed calls to H5ToolsFopen() function.
library for it(H5ToolsFopen-takes a filename and a char ptr if you want the name of the driver)
added the function to h5tools.c, a header to h5tools.h and changed h5ls.c and h5dump.c to use the new
functions
the header information in the dumper. the header is the part before the data
block.
in h5dump.c there is support for the new -xml option. prints the output in xml
using the structure we just defined in h5tools.h.
h5dump.h- changed the begin_obj and end_obj macros. take an extra parameter now
now the dump structure contains 2 extra members that tell how to format the
data for the dataset regions(blocks and pts).
had to give h5ls values for these
in h5dump.c just initialized the values for the formatting struct.
in h5tools.c made some changes in the printing area to get the dump output to
look closer to what we wanted. the strings are currently not printing correctly.
also removed the program type variable from here.
Added -V option for displaying version information.
h5tools.c:
Added print_version routine to display version information.
h5tools.h:
Added print_version prototype.
with out the square braces. also the formatting for the compound types
in the dataset part section has been corrected.
still need to update the expected outputs so there will be some errors until
I get that all checked in...
had to change some of the functions in the h5findshd.c file since we didn't
have the globals anymore. these changes also affected the h5toh5.c file.
passes all tests on unix
so i moved the dumper stuff out to the libary. Had to change some functions
in h5findshd so they would stop using globals that shouldn't be defined in the
lib. I will remove the globals next. also the h5findshd.c has an extra member
to the struct for that objects in the table so i added that into the appropriate place.
the dumper is working ok now but the h5toh4 is still broken.
h5tools.h- added a define for OBJECTID-->"OBJECTID"
h5dump.c - added an option in there to print object id's
still needs some testing but I just wanted the changes to be put up there before i
forget
oooops i forgot to include a case statement in two switch statements (1 in each file)
that print the actual data of the enum datasets
i had to change a line of h5dump_sprint.
when it checks to see that is an enum val isn't an escape sequence i appended
this result onto the end of the str