summaryrefslogtreecommitdiffstats
path: root/src/H5O.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-10-30 23:46:27 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-10-30 23:46:27 (GMT)
commit3f69573f575390295536c0faa6d083c58a7291fa (patch)
tree554230227da6e04f650668ec3421052806a9a8df /src/H5O.c
parentc19a43d85474fc21308cb3e5e59dbc535edf4174 (diff)
downloadhdf5-3f69573f575390295536c0faa6d083c58a7291fa.zip
hdf5-3f69573f575390295536c0faa6d083c58a7291fa.tar.gz
hdf5-3f69573f575390295536c0faa6d083c58a7291fa.tar.bz2
[svn-r12832] Description:
Clean up formatting and re-organize a bit... Tested on: Max OS X/32 10.4.8 (amazon) FreeBSD/32 4.11 (sleipnir) Linux/32 2.4 (heping) Linux/64 2.4 (mir)
Diffstat (limited to 'src/H5O.c')
-rw-r--r--src/H5O.c62
1 files changed, 33 insertions, 29 deletions
diff --git a/src/H5O.c b/src/H5O.c
index c2528f9..74ae1d7 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -276,6 +276,7 @@ H5FL_DEFINE_STATIC(H5O_addr_map_t);
*
* The opened object should be closed again with H5Oclose
* or H5Gclose, H5Tclose, or H5Dclose.
+ *
* Return: Success: An open object identifier
* Failure: Negative
*
@@ -564,35 +565,38 @@ H5O_open_by_loc(H5G_loc_t *obj_loc, hid_t dxpl_id)
/* Get the type of the object and open it in the correct way */
switch(H5O_obj_type(obj_loc->oloc, dxpl_id))
{
- case(H5G_GROUP):
- /* Open the group */
- if((grp = H5G_open(obj_loc, dxpl_id)) == NULL)
- HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open group")
- /* Register an atom for the group */
- if((ret_value = H5I_register(H5I_GROUP, grp)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register group")
- break;
-
- case(H5G_DATASET):
- /* Open the group */
- if((dset = H5D_open(obj_loc, dxpl_id)) == NULL)
- HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open dataset")
- /* Register an atom for the group */
- if((ret_value = H5I_register(H5I_DATASET, dset)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register dataset")
- break;
-
- case(H5G_TYPE):
- /* Open the group */
- if((type = H5T_open(obj_loc, dxpl_id)) == NULL)
- HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open datatype")
- /* Register an atom for the group */
- if((ret_value = H5I_register(H5I_DATATYPE, type)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register datatype")
- break;
-
- default:
- HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, FAIL, "invalid object type")
+ case(H5G_GROUP):
+ /* Open the group */
+ if((grp = H5G_open(obj_loc, dxpl_id)) == NULL)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open group")
+
+ /* Register an atom for the group */
+ if((ret_value = H5I_register(H5I_GROUP, grp)) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register group")
+ break;
+
+ case(H5G_DATASET):
+ /* Open the group */
+ if((dset = H5D_open(obj_loc, dxpl_id)) == NULL)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open dataset")
+
+ /* Register an atom for the group */
+ if((ret_value = H5I_register(H5I_DATASET, dset)) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register dataset")
+ break;
+
+ case(H5G_TYPE):
+ /* Open the group */
+ if((type = H5T_open(obj_loc, dxpl_id)) == NULL)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open datatype")
+
+ /* Register an atom for the group */
+ if((ret_value = H5I_register(H5I_DATATYPE, type)) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register datatype")
+ break;
+
+ default:
+ HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, FAIL, "invalid object type")
}
done: