summaryrefslogtreecommitdiffstats
path: root/tools/h5copy
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2012-03-02 14:21:13 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2012-03-02 14:21:13 (GMT)
commit68d93b7f4e458ace2ac255c1c7d9dd8873132b51 (patch)
tree5e8429affabf4e90eee15cc85119820b3afc36a8 /tools/h5copy
parentc714d9ef43e8b442bd271867c7afab0487fc0c0a (diff)
downloadhdf5-68d93b7f4e458ace2ac255c1c7d9dd8873132b51.zip
hdf5-68d93b7f4e458ace2ac255c1c7d9dd8873132b51.tar.gz
hdf5-68d93b7f4e458ace2ac255c1c7d9dd8873132b51.tar.bz2
[svn-r22013] HDFFV-7560:
Merge 1.8 and h5dump/tools and tests based on tools library from trunk. Reduced warnings. HDFFV-7949: Remove duplicated functions in h5ls Tested: local linux,h5committest
Diffstat (limited to 'tools/h5copy')
-rw-r--r--tools/h5copy/CMakeLists.txt2
-rw-r--r--tools/h5copy/h5copy.c9
-rw-r--r--tools/h5copy/h5copygentest.c11
3 files changed, 8 insertions, 14 deletions
diff --git a/tools/h5copy/CMakeLists.txt b/tools/h5copy/CMakeLists.txt
index b0b9aa8..7006283 100644
--- a/tools/h5copy/CMakeLists.txt
+++ b/tools/h5copy/CMakeLists.txt
@@ -27,7 +27,7 @@ IF (BUILD_TESTING)
IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
ADD_EXECUTABLE (h5copygentest ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/h5copygentest.c)
TARGET_NAMING (h5copygentest ${LIB_TYPE})
- TARGET_LINK_LIBRARIES (h5copygentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+ TARGET_LINK_LIBRARIES (h5copygentest ${HDF5_LIB_TARGET})
SET_TARGET_PROPERTIES (h5copygentest PROPERTIES FOLDER generator/tools)
#ADD_TEST (NAME h5copygentest COMMAND $<TARGET_FILE:h5copygentest>)
diff --git a/tools/h5copy/h5copy.c b/tools/h5copy/h5copy.c
index fb8bb81..574ba94 100644
--- a/tools/h5copy/h5copy.c
+++ b/tools/h5copy/h5copy.c
@@ -55,7 +55,7 @@ static void
leave(int ret)
{
h5tools_close();
- exit(ret);
+ HDexit(ret);
}
@@ -75,7 +75,7 @@ leave(int ret)
static void
usage (void)
{
- fprintf(stdout, "\
+ HDfprintf(stdout, "\
usage: h5copy [OPTIONS] [OBJECTS...]\n\
OBJECTS\n\
-i, --input input file name\n\
@@ -219,6 +219,7 @@ main (int argc, const char *argv[])
h5tools_setprogname(PROGRAMNAME);
h5tools_setstatus(EXIT_SUCCESS);
+
/* initialize h5tools lib */
h5tools_init();
@@ -464,7 +465,7 @@ main (int argc, const char *argv[])
/* free link info path */
if (linkinfo.trg_path)
- HDfree(linkinfo.trg_path);
+ HDfree((char*)linkinfo.trg_path);
/* close propertis */
if(H5Pclose(ocpl_id)<0)
@@ -496,7 +497,7 @@ error:
/* free link info path */
if (linkinfo.trg_path)
- HDfree(linkinfo.trg_path);
+ HDfree((char*)linkinfo.trg_path);
H5E_BEGIN_TRY {
H5Pclose(ocpl_id);
diff --git a/tools/h5copy/h5copygentest.c b/tools/h5copy/h5copygentest.c
index 85bcb29..e658e92 100644
--- a/tools/h5copy/h5copygentest.c
+++ b/tools/h5copy/h5copygentest.c
@@ -19,10 +19,6 @@
#include <stdlib.h>
#include "hdf5.h"
#include "H5private.h"
-#include "h5tools.h"
-
-/* Name of tool */
-#define PROGRAMNAME "h5copygentest"
/* HDF file names */
#define HDF_FILE1 "h5copytst.h5"
@@ -365,7 +361,7 @@ static void gent_empty_group(hid_t loc_id)
* Function: gent_nested_datasets
*
* Purpose: Generate a group in a location and populate it with the "standard"
- * datasets
+ * datasets
*
*-------------------------------------------------------------------------
*/
@@ -387,7 +383,7 @@ static void gent_nested_datasets(hid_t loc_id)
* Function: gent_nested_group
*
* Purpose: Generate a group in a location and populate it with another group
- * containing the "standard" datasets
+ * containing the "standard" datasets
*
*-------------------------------------------------------------------------
*/
@@ -891,9 +887,6 @@ out:
int main(void)
{
- h5tools_setprogname(PROGRAMNAME);
- h5tools_setstatus(EXIT_SUCCESS);
-
Test_Obj_Copy();
Test_Ref_Copy();
Test_Extlink_Copy();