summaryrefslogtreecommitdiffstats
path: root/tools/h5dump/h5dump.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2011-05-11 20:45:54 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2011-05-11 20:45:54 (GMT)
commitf49dc381271ac53a508628856787463668789772 (patch)
treed424cac8fb50120d9080086d54fd8d98a0977d03 /tools/h5dump/h5dump.c
parent2e7d42a43c60753d99d3bed37d121ca30ac5db1c (diff)
downloadhdf5-f49dc381271ac53a508628856787463668789772.zip
hdf5-f49dc381271ac53a508628856787463668789772.tar.gz
hdf5-f49dc381271ac53a508628856787463668789772.tar.bz2
[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
Diffstat (limited to 'tools/h5dump/h5dump.c')
-rw-r--r--tools/h5dump/h5dump.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index 05ec369..cfeaaef 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -4560,7 +4560,7 @@ error:
if (hand) {
free_handler(hand, argc);
hand = NULL;
-}
+ }
h5tools_setstatus(EXIT_FAILURE);
return hand;
@@ -4630,7 +4630,6 @@ main(int argc, const char *argv[])
/* Initialize h5tools lib */
h5tools_init();
if((hand = parse_command_line(argc, argv))==NULL) {
- h5tools_setstatus(EXIT_FAILURE);
goto done;
}
@@ -4834,14 +4833,17 @@ done:
/* Free tables for objects */
table_list_free();
- if (H5Fclose(fid) < 0)
- h5tools_setstatus(EXIT_FAILURE);
-
- if(hand)
- free_handler(hand, argc);
+ if(hand)
+ free_handler(hand, argc);
- HDfree(prefix);
- HDfree(fname);
+ if(fid >=0)
+ if (H5Fclose(fid) < 0)
+ h5tools_setstatus(EXIT_FAILURE);
+
+ if(prefix)
+ HDfree(prefix);
+ if(fname)
+ HDfree(fname);
/* To Do: clean up XML table */