diff options
Diffstat (limited to 'tools/h5dump.c')
-rw-r--r-- | tools/h5dump.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/tools/h5dump.c b/tools/h5dump.c index 882cc85..6272ca4 100644 --- a/tools/h5dump.c +++ b/tools/h5dump.c @@ -215,7 +215,7 @@ usage(void) Usage of HDF5 Dumper:\n\ \n\ h5dump [-h] [-bb] [-header] [-v] [-V] [-a <names>] [-d <names>] [-g <names>]\n\ - [-l <names>] [-t <names>] [-w <number>] <file>\n\ + [-l <names>] [-o <fname>] [-t <names>] [-w <number>] <file>\n\ \n\ -h Print information on this command and exit.\n\ -bb Display the conent of the boot block. [Default: don't display]\n\ @@ -1295,10 +1295,10 @@ dump_data(hid_t obj_id, int obj_data) * Function: set_output_file * * Purpose: Open fname as the output file for dataset raw data. - * Set rawdatastream as its file stream. + * Set rawdatastream as its file stream. * * Return: 0 -- succeeded - * negative -- failed + * negative -- failed * * Programmer: Albert Cheng, 2000/09/30 * @@ -1359,6 +1359,9 @@ main(int argc, char *argv[]) H5Eget_auto(&func, &edata); H5Eset_auto(NULL, NULL); + /* Initialize h5tools lib */ + h5tools_init(); + opts = malloc((argc / 2) * sizeof(int)); opts[0] = -1; @@ -1712,23 +1715,20 @@ main(int argc, char *argv[]) end_obj(dump_header_format->fileend, dump_header_format->fileblockend); done: - H5Eset_auto(func, edata); - free(opts); - if (H5Fclose(fid) < 0) d_status = 1; - if (rawdatastream && rawdatastream != stdout) - if (fclose(rawdatastream)) - perror("fclose"); - - free(group_table->objs); free(dset_table->objs); free(type_table->objs); free(prefix); free(info->prefix); free(info); + free(opts); + + h5tools_close(); + H5Eset_auto(func, edata); + return d_status; } |