summaryrefslogtreecommitdiffstats
path: root/fortran/src/H5Ff.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-07-06 19:45:35 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-07-06 19:45:35 (GMT)
commit98754fa9d12090f5e048fdb05cc5e9ce9111676f (patch)
tree407e611b19ee551d8153779104022dd886a467e5 /fortran/src/H5Ff.c
parent29321bcafa9f1c6108bb92b5a844a9d4d9c2c8e7 (diff)
downloadhdf5-98754fa9d12090f5e048fdb05cc5e9ce9111676f.zip
hdf5-98754fa9d12090f5e048fdb05cc5e9ce9111676f.tar.gz
hdf5-98754fa9d12090f5e048fdb05cc5e9ce9111676f.tar.bz2
[svn-r19050] Description:
Bring r18704:19049 from trunk to revise_chunks branch. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in debug mode Mac OS X/32 10.6.3 (amazon) in debug mode Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'fortran/src/H5Ff.c')
-rw-r--r--fortran/src/H5Ff.c50
1 files changed, 27 insertions, 23 deletions
diff --git a/fortran/src/H5Ff.c b/fortran/src/H5Ff.c
index 51a53a8..9640444 100644
--- a/fortran/src/H5Ff.c
+++ b/fortran/src/H5Ff.c
@@ -444,32 +444,36 @@ nh5fget_obj_count_c ( hid_t_f *file_id , int_f *obj_type, size_t_f * obj_count)
* number of open objects
* Thursday, September 25, 2008 EIP
*---------------------------------------------------------------------------*/
-
int_f
-nh5fget_obj_ids_c ( hid_t_f *file_id , int_f *obj_type, size_t_f *max_objs, hid_t_f *obj_ids, size_t_f *num_objs)
+nh5fget_obj_ids_c(hid_t_f *file_id, int_f *obj_type, size_t_f *max_objs,
+ hid_t_f *obj_ids, size_t_f *num_objs)
{
- int ret_value = 0;
- hid_t c_file_id;
- unsigned c_obj_type;
- int i;
- size_t c_max_objs;
- ssize_t c_num_objs;
- hid_t *c_obj_ids;
-
- c_file_id = (hid_t)*file_id;
- c_obj_type = (unsigned) *obj_type;
- c_max_objs = (size_t)*max_objs;
- c_obj_ids = (hid_t *)HDmalloc(sizeof(hid_t)*c_max_objs);
-
- c_num_objs = H5Fget_obj_ids(c_file_id, c_obj_type, c_max_objs, c_obj_ids);
- if ( c_num_objs < 0 ) ret_value = -1;
- for (i=0; i< c_max_objs; i++) obj_ids[i] = (hid_t_f)c_obj_ids[i];
-
- HDfree(c_obj_ids);
- *num_objs = (size_t_f)c_num_objs;
-
- return ret_value;
+ int ret_value = 0;
+ hid_t c_file_id;
+ unsigned c_obj_type;
+ size_t u;
+ size_t c_max_objs;
+ ssize_t c_num_objs;
+ hid_t *c_obj_ids;
+
+ c_file_id = (hid_t)*file_id;
+ c_obj_type = (unsigned) *obj_type;
+ c_max_objs = (size_t)*max_objs;
+ c_obj_ids = (hid_t *)HDmalloc(sizeof(hid_t)*c_max_objs);
+
+ c_num_objs = H5Fget_obj_ids(c_file_id, c_obj_type, c_max_objs, c_obj_ids);
+ if(c_num_objs < 0)
+ ret_value = -1;
+ for(u = 0; u < c_max_objs; u++)
+ obj_ids[u] = (hid_t_f)c_obj_ids[u];
+
+ HDfree(c_obj_ids);
+ *num_objs = (size_t_f)c_num_objs;
+
+ return ret_value;
}
+
+
/*----------------------------------------------------------------------------
* Name: h5fget_freespace_c
* Purpose: Call H5Fget_freespace to get amount of free space within a file