diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2021-02-22 04:05:43 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-22 04:05:43 (GMT) |
commit | df1a4af96126682ea4a05c2b26bf6b7c916579ff (patch) | |
tree | 993205ed1edde76001a811532f91997138b46744 /tools/h5copy/h5copy.c | |
parent | 88960489604861813b3676bc234f49ca8ee937d3 (diff) | |
download | hdf5-df1a4af96126682ea4a05c2b26bf6b7c916579ff.zip hdf5-df1a4af96126682ea4a05c2b26bf6b7c916579ff.tar.gz hdf5-df1a4af96126682ea4a05c2b26bf6b7c916579ff.tar.bz2 |
HDF5 1 8 merge of recent changes and tools (#353)
* Update supported platforms
* Merge PR#3 changes from develop
* # WARNING: head commit changed in the meantime
Merge gcc 10 diagnostics option from develop
Merge CMake changes from develop
Merge warnings from develop
Merge #318 OSX changes from develop
Merge tools changes from develop
Merge test macros from develop
* Format updates
* Fix missing semicolon and format fix
* Format update
* Correct actions, remove java option
* Update autotools build files
* Add testfiles
* Fix configure issue with make flags
* Init fapls to default
* Update generated files and fix h5repack id closure
* update format
Diffstat (limited to 'tools/h5copy/h5copy.c')
-rw-r--r-- | tools/h5copy/h5copy.c | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/tools/h5copy/h5copy.c b/tools/h5copy/h5copy.c index 3144950..f618914 100644 --- a/tools/h5copy/h5copy.c +++ b/tools/h5copy/h5copy.c @@ -214,17 +214,13 @@ 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; unsigned verbose = 0; unsigned parents = 0; - hid_t ocpl_id = (-1); /* Object copy property list */ - hid_t lcpl_id = (-1); /* Link creation property list */ + hid_t ocpl_id = H5I_INVALID_HID; /* Object copy property list */ + hid_t lcpl_id = H5I_INVALID_HID; /* Link creation property list */ int opt; int li_ret; h5tool_link_info_t linkinfo; @@ -233,17 +229,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)); @@ -337,10 +325,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 @@ -349,13 +335,13 @@ main(int argc, const char *argv[]) /* Attempt to open an existing HDF5 file first. Need to open the dst file before the src file just in case that the dst and src are the same file */ - fid_dst = h5tools_fopen(fname_dst, H5F_ACC_RDWR, H5P_DEFAULT, NULL, NULL, 0); + fid_dst = h5tools_fopen(fname_dst, H5F_ACC_RDWR, H5P_DEFAULT, FALSE, NULL, 0); /*------------------------------------------------------------------------- * open input file *-------------------------------------------------------------------------*/ - fid_src = h5tools_fopen(fname_src, H5F_ACC_RDONLY, H5P_DEFAULT, NULL, NULL, 0); + fid_src = h5tools_fopen(fname_src, H5F_ACC_RDONLY, H5P_DEFAULT, FALSE, NULL, 0); /*------------------------------------------------------------------------- * test for error in opening input file |