summaryrefslogtreecommitdiffstats
path: root/tools/h5copy
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2008-09-16 15:52:51 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2008-09-16 15:52:51 (GMT)
commitbdd7d59902483885dd8b883f3b2393e77383e5e8 (patch)
treeaaf20ab132d057b95b3c016d50fc22b77719084b /tools/h5copy
parent8bc0d5ed9019a681e1ea20c24264415d01c1cf2a (diff)
downloadhdf5-bdd7d59902483885dd8b883f3b2393e77383e5e8.zip
hdf5-bdd7d59902483885dd8b883f3b2393e77383e5e8.tar.gz
hdf5-bdd7d59902483885dd8b883f3b2393e77383e5e8.tar.bz2
[svn-r15628] Description:
Remove trailing whitespace from C/C++ source files, with the following script: foreach f (*.[ch] *.cpp) sed 's/[[:blank:]]*$//' $f > sed.out && mv sed.out $f end Tested on: Mac OS X/32 10.5.5 (amazon) No need for h5committest, just whitespace changes...
Diffstat (limited to 'tools/h5copy')
-rw-r--r--tools/h5copy/h5copy.c42
-rw-r--r--tools/h5copy/h5copygentest.c4
2 files changed, 23 insertions, 23 deletions
diff --git a/tools/h5copy/h5copy.c b/tools/h5copy/h5copy.c
index a4d1675..e487f2e 100644
--- a/tools/h5copy/h5copy.c
+++ b/tools/h5copy/h5copy.c
@@ -55,7 +55,7 @@ static void
leave(int ret)
{
h5tools_close();
-
+
exit(ret);
}
@@ -118,8 +118,8 @@ usage: h5copy [OPTIONS] [OBJECTS...]\n\
* soft H5O_COPY_EXPAND_SOFT_LINK_FLAG: Expand soft links into new objects
* ext H5O_COPY_EXPAND_EXT_LINK_FLAG: Expand external links into new objects
* ref H5O_COPY_EXPAND_OBJ_REFERENCE_FLAG: Copy objects that are pointed by references
- * noattr H5O_COPY_WITHOUT_ATTR_FLAG Copy object without copying attributes
- * allflags Switches all flags from the default to the non-default setting
+ * noattr H5O_COPY_WITHOUT_ATTR_FLAG Copy object without copying attributes
+ * allflags Switches all flags from the default to the non-default setting
*
* Return: Success: SUCCEED
* Failure: FAIL
@@ -139,7 +139,7 @@ static int parse_flag(const char* str_flag, unsigned *flag)
if (strcmp(str_flag,"shallow")==0)
{
fla = H5O_COPY_SHALLOW_HIERARCHY_FLAG;
- }
+ }
else if (strcmp(str_flag,"soft")==0)
{
fla = H5O_COPY_EXPAND_SOFT_LINK_FLAG;
@@ -214,14 +214,14 @@ main (int argc, const char *argv[])
} /* end if */
/* parse command line options */
- while ((opt = get_option(argc, argv, s_opts, l_opts)) != EOF)
+ while ((opt = get_option(argc, argv, s_opts, l_opts)) != EOF)
{
- switch ((char)opt)
+ switch ((char)opt)
{
case 'd':
oname_dst = strdup(opt_arg);
break;
-
+
case 'f':
/* validate flag */
if (parse_flag(opt_arg,&flag)<0)
@@ -272,28 +272,28 @@ main (int argc, const char *argv[])
* check for missing file/object names
*-------------------------------------------------------------------------*/
- if (fname_src==NULL)
+ if (fname_src==NULL)
{
error_msg(progname, "Input file name missing\n");
usage();
leave(EXIT_FAILURE);
}
- if (fname_dst==NULL)
+ if (fname_dst==NULL)
{
error_msg(progname, "Output file name missing\n");
usage();
leave(EXIT_FAILURE);
}
- if (oname_src==NULL)
+ if (oname_src==NULL)
{
error_msg(progname, "Source object name missing\n");
usage();
leave(EXIT_FAILURE);
}
- if (oname_dst==NULL)
+ if (oname_dst==NULL)
{
error_msg(progname, "Destination object name missing\n");
usage();
@@ -304,7 +304,7 @@ main (int argc, const char *argv[])
/*-------------------------------------------------------------------------
* open input file
*-------------------------------------------------------------------------*/
-
+
fid_src = h5tools_fopen(fname_src, H5F_ACC_RDONLY, H5P_DEFAULT, NULL, NULL, 0);
/*-------------------------------------------------------------------------
@@ -342,11 +342,11 @@ main (int argc, const char *argv[])
free(fname_dst);
leave(EXIT_FAILURE);
}
-
+
/*-------------------------------------------------------------------------
* print some info
*-------------------------------------------------------------------------*/
-
+
if (verbose)
{
printf("Copying file <%s> and object <%s> to file <%s> and object <%s>\n",
@@ -358,19 +358,19 @@ main (int argc, const char *argv[])
printf("Using %s flag\n", str_flag);
}
-
+
/*-------------------------------------------------------------------------
* create property lists for copy
*-------------------------------------------------------------------------*/
-
+
/* create property to pass copy options */
- if ( (ocpl_id = H5Pcreate(H5P_OBJECT_COPY)) < 0)
+ if ( (ocpl_id = H5Pcreate(H5P_OBJECT_COPY)) < 0)
goto error;
/* set options for object copy */
if (flag)
{
- if ( H5Pset_copy_object(ocpl_id, flag) < 0)
+ if ( H5Pset_copy_object(ocpl_id, flag) < 0)
goto error;
}
@@ -404,7 +404,7 @@ main (int argc, const char *argv[])
ocpl_id, /* Object copy property list */
lcpl_id)<0) /* Link creation property list */
goto error;
-
+
/* close propertis */
if(H5Pclose(ocpl_id)<0)
goto error;
@@ -427,7 +427,7 @@ main (int argc, const char *argv[])
free(oname_src);
h5tools_close();
-
+
return 0;
error:
@@ -448,7 +448,7 @@ error:
free(oname_src);
h5tools_close();
-
+
return 1;
}
diff --git a/tools/h5copy/h5copygentest.c b/tools/h5copy/h5copygentest.c
index 52467d7..7842b38 100644
--- a/tools/h5copy/h5copygentest.c
+++ b/tools/h5copy/h5copygentest.c
@@ -218,7 +218,7 @@ static void gent_named_vl(hid_t loc_id)
{
hid_t sid, did, tid;
hsize_t dims[1] = {2};
- hvl_t buf[2];
+ hvl_t buf[2];
/* allocate and initialize VL dataset to write */
buf[0].len = 1;
@@ -264,7 +264,7 @@ static void gent_nested_vl(hid_t loc_id)
hid_t sid, did, tid1, tid2;
hsize_t dims[1] = {2};
hvl_t buf[2];
- hvl_t *tvl;
+ hvl_t *tvl;
/* allocate and initialize VL dataset to write */
buf[0].len = 1;