summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/h5repack_copy.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-09-06 15:54:22 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-09-06 15:54:22 (GMT)
commit3bed8703631cbcffb215ccd82235fcc293e14218 (patch)
treebf56b0bcd4f41986f17138059f6349df78f0c059 /tools/h5repack/h5repack_copy.c
parent3eb8c81b8046d282ced9c2d94e7132058243013e (diff)
downloadhdf5-3bed8703631cbcffb215ccd82235fcc293e14218.zip
hdf5-3bed8703631cbcffb215ccd82235fcc293e14218.tar.gz
hdf5-3bed8703631cbcffb215ccd82235fcc293e14218.tar.bz2
[svn-r14136] Description:
Move H5Gget_num_objs() and several minor macros, etc. to deprecated symbols section, replacing it with H5Gget_info(). Tested on: FreeBSD/32 6.2 (duty) FreeBSD/64 6.2 (liberty) Linux/32 2.6 (kagiso) Linux/64 2.6 (smirom) AIX/32 5.3 (copper) Solaris/32 5.10 (linew) Mac OS X/32 10.4.10 (amazon)
Diffstat (limited to 'tools/h5repack/h5repack_copy.c')
-rw-r--r--tools/h5repack/h5repack_copy.c33
1 files changed, 11 insertions, 22 deletions
diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c
index f32d15d..c710bce 100644
--- a/tools/h5repack/h5repack_copy.c
+++ b/tools/h5repack/h5repack_copy.c
@@ -329,9 +329,18 @@ int do_copy_objects(hid_t fidin,
*/
case H5G_GROUP:
if (options->verbose)
- printf(FORMAT_OBJ,"group",travt->objs[i].name );
+ printf(FORMAT_OBJ,"group",travt->objs[i].name );
- if (options->grp_compact>0 || options->grp_indexed>0) {
+ /*-------------------------------------------------------------------------
+ * the root is a special case, we get an ID for the root group
+ * and copy its attributes using that ID
+ *-------------------------------------------------------------------------
+ */
+ if(HDstrcmp(travt->objs[i].name, "/") == 0) {
+ if ((grp_out = H5Gopen2(fidout, "/", H5P_DEFAULT)) < 0)
+ goto error;
+ }
+ else if (options->grp_compact>0 || options->grp_indexed>0) {
/* Set up group creation property list */
if((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0)
goto error;
@@ -780,26 +789,6 @@ int do_copy_objects(hid_t fidin,
} /* i */
- /*-------------------------------------------------------------------------
- * the root is a special case, we get an ID for the root group
- * and copy its attributes using that ID
- *-------------------------------------------------------------------------
- */
-
- if ((grp_out = H5Gopen2(fidout, "/", H5P_DEFAULT)) < 0)
- goto error;
-
- if ((grp_in = H5Gopen2(fidin, "/", H5P_DEFAULT)) < 0)
- goto error;
-
- if (copy_attr(grp_in,grp_out,options)<0)
- goto error;
-
- if (H5Gclose(grp_out)<0)
- goto error;
- if (H5Gclose(grp_in)<0)
- goto error;
-
return 0;
error: