diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2020-07-15 16:20:16 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2020-07-15 16:20:16 (GMT) |
commit | bac0fc6309aaf777d4b6d093cf027dce3ecfb58c (patch) | |
tree | 1b944edb35a01a5bb8bb72445f82afb52317f06e /tools/src/h5stat | |
parent | 900e75544e214a82de3b7fcdbc083ee71d484892 (diff) | |
download | hdf5-bac0fc6309aaf777d4b6d093cf027dce3ecfb58c.zip hdf5-bac0fc6309aaf777d4b6d093cf027dce3ecfb58c.tar.gz hdf5-bac0fc6309aaf777d4b6d093cf027dce3ecfb58c.tar.bz2 |
Tools refactor
Move error_stack setup to tools library
Add structure for h5dump properties
Eliminate duplicated h5diff functions
Use properties structure in place of argument lists.
Diffstat (limited to 'tools/src/h5stat')
-rw-r--r-- | tools/src/h5stat/h5stat.c | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/tools/src/h5stat/h5stat.c b/tools/src/h5stat/h5stat.c index fb3d50d7..ec4b5ab 100644 --- a/tools/src/h5stat/h5stat.c +++ b/tools/src/h5stat/h5stat.c @@ -1786,32 +1786,23 @@ main(int argc, const char *argv[]) iter_t iter; const char *fname = NULL; hid_t fid = H5I_INVALID_HID; - H5E_auto2_t func; - H5E_auto2_t tools_func; - void *edata; - void *tools_edata; struct handler_t *hand = NULL; hid_t fapl_id = H5P_DEFAULT; h5tools_setprogname(PROGRAMNAME); h5tools_setstatus(EXIT_SUCCESS); - /* Disable error reporting */ - H5Eget_auto2(H5E_DEFAULT, &func, &edata); - H5Eset_auto2(H5E_DEFAULT, NULL, NULL); - /* Initialize h5tools lib */ h5tools_init(); - /* Disable tools error reporting */ - H5Eget_auto2(H5tools_ERR_STACK_g, &tools_func, &tools_edata); - H5Eset_auto2(H5tools_ERR_STACK_g, NULL, NULL); - HDmemset(&iter, 0, sizeof(iter)); if(parse_command_line(argc, argv, &hand) < 0) goto done; + /* enable error reporting if command line option */ + h5tools_error_report(); + if (drivername) { h5tools_vfd_info_t vfd_info; @@ -1843,11 +1834,6 @@ main(int argc, const char *argv[]) fname = argv[opt_ind]; - if(enable_error_stack > 0) { - H5Eset_auto2(H5E_DEFAULT, func, edata); - H5Eset_auto2(H5tools_ERR_STACK_g, tools_func, tools_edata); - } - /* Check for filename given */ if(fname) { hid_t fcpl; @@ -1952,8 +1938,6 @@ done: h5tools_setstatus(EXIT_FAILURE); } /* end if */ - H5Eset_auto2(H5E_DEFAULT, func, edata); - leave(h5tools_getstatus()); } /* end main() */ |