summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-08-28 22:45:23 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-08-28 22:45:23 (GMT)
commitbc07e61d2937d1e62e0fc1fec10f54ed9647fa3b (patch)
treee4086a55da2a8a48e36eee285d7504502b73d83d /fortran
parentcae55b647da56ab390e048219efaef6a1afdccee (diff)
downloadhdf5-bc07e61d2937d1e62e0fc1fec10f54ed9647fa3b.zip
hdf5-bc07e61d2937d1e62e0fc1fec10f54ed9647fa3b.tar.gz
hdf5-bc07e61d2937d1e62e0fc1fec10f54ed9647fa3b.tar.bz2
[svn-r14123] Description:
Move H5Gmove2() to deprecated code section, replacing it with H5Lmove() in the source code. Tested on: FreeBSD/32 6.2 (duty) FreeBSD/64 6.2 (liberty) Linux/32 2.6 (kagiso) Linux/64 2.6 (smirom) Solaris/32 5.10 (linew) Mac OS X/32 10.4.10 (amazon)
Diffstat (limited to 'fortran')
-rw-r--r--fortran/src/H5Gf.c53
1 files changed, 23 insertions, 30 deletions
diff --git a/fortran/src/H5Gf.c b/fortran/src/H5Gf.c
index 1f45a94..0ca7e38 100644
--- a/fortran/src/H5Gf.c
+++ b/fortran/src/H5Gf.c
@@ -462,7 +462,7 @@ DONE:
HDfree(c_src_name);
if(c_dst_name)
HDfree(c_dst_name);
- return ret_value ;
+ return ret_value;
}
/*----------------------------------------------------------------------------
@@ -483,38 +483,31 @@ DONE:
int_f
nh5gmove2_c(hid_t_f *src_loc_id, _fcd src_name, int_f *src_namelen, hid_t_f *dst_loc_id, _fcd dst_name, int_f*dst_namelen)
{
- int ret_value = -1;
- hid_t c_src_loc_id;
- hid_t c_dst_loc_id;
- char *c_src_name, *c_dst_name;
- size_t c_src_namelen, c_dst_namelen;
- herr_t c_ret_value;
- /*
- * Convert Fortran name to C name
- */
- c_src_namelen = *src_namelen;
- c_dst_namelen = *dst_namelen;
- c_src_name = (char *)HD5f2cstring(src_name, c_src_namelen);
- if(c_src_name == NULL) return ret_value;
-
- c_dst_name = (char *)HD5f2cstring(dst_name, c_dst_namelen);
- if(c_dst_name == NULL) { HDfree(c_src_name);
- return ret_value;
- }
- /*
- * Call H5Gmove2 function
- */
- c_src_loc_id = (hid_t)*src_loc_id;
- c_dst_loc_id = (hid_t)*dst_loc_id;
- c_ret_value = H5Gmove2(c_src_loc_id, c_src_name, c_dst_loc_id, c_dst_name);
- if(c_ret_value < 0) goto DONE;
+ char *c_src_name = NULL, *c_dst_name = NULL;
+ int ret_value = -1;
- ret_value = 0;
+ /*
+ * Convert Fortran name to C name
+ */
+ if(NULL == (c_src_name = (char *)HD5f2cstring(src_name, (size_t)*src_namelen)))
+ goto DONE;
+ if(NULL == (c_dst_name = (char *)HD5f2cstring(dst_name, (size_t)*dst_namelen)))
+ goto DONE;
+
+ /*
+ * Call H5Gmove2 function
+ */
+ if(H5Lmove((hid_t)*src_loc_id, c_src_name, (hid_t)*dst_loc_id, c_dst_name, H5P_DEFAULT, H5P_DEFAULT) < 0)
+ goto DONE;
+
+ ret_value = 0;
DONE:
- HDfree(c_src_name);
- HDfree(c_dst_name);
- return ret_value ;
+ if(c_src_name)
+ HDfree(c_src_name);
+ if(c_dst_name)
+ HDfree(c_dst_name);
+ return ret_value;
}
/*----------------------------------------------------------------------------