summaryrefslogtreecommitdiffstats
path: root/tools/src/h5copy
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-07-15 16:20:16 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-07-15 16:20:16 (GMT)
commitbac0fc6309aaf777d4b6d093cf027dce3ecfb58c (patch)
tree1b944edb35a01a5bb8bb72445f82afb52317f06e /tools/src/h5copy
parent900e75544e214a82de3b7fcdbc083ee71d484892 (diff)
downloadhdf5-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/h5copy')
-rw-r--r--tools/src/h5copy/h5copy.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/tools/src/h5copy/h5copy.c b/tools/src/h5copy/h5copy.c
index 8805d08..5b19ae7 100644
--- a/tools/src/h5copy/h5copy.c
+++ b/tools/src/h5copy/h5copy.c
@@ -207,10 +207,6 @@ static int parse_flag(const char* s_flag, unsigned *flag)
int
main (int argc, const char *argv[])
{
- H5E_auto2_t func;
- H5E_auto2_t tools_func;
- void *edata;
- void *tools_edata;
hid_t fid_src = H5I_INVALID_HID;
hid_t fid_dst = H5I_INVALID_HID;
unsigned flag = 0;
@@ -226,17 +222,9 @@ main (int argc, const char *argv[])
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);
-
/* init linkinfo struct */
HDmemset(&linkinfo, 0, sizeof(h5tool_link_info_t));
@@ -330,10 +318,8 @@ main (int argc, const char *argv[])
leave(EXIT_FAILURE);
}
- if (enable_error_stack > 0) {
- H5Eset_auto2(H5E_DEFAULT, func, edata);
- H5Eset_auto2(H5tools_ERR_STACK_g, tools_func, tools_edata);
- }
+ /* enable error reporting if command line option */
+ h5tools_error_report();
/*-------------------------------------------------------------------------
* open output file