summaryrefslogtreecommitdiffstats
path: root/src/H5Tdeprec.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-10-01 15:29:53 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-10-01 15:29:53 (GMT)
commitec8ad09125032c9c232878d02e90aa86df162841 (patch)
tree5d63105d3a0db7d5bbee41c5b74b097649a2115e /src/H5Tdeprec.c
parent453238e90e1574ef1c15e3c79f7fb3d77920e77c (diff)
downloadhdf5-ec8ad09125032c9c232878d02e90aa86df162841.zip
hdf5-ec8ad09125032c9c232878d02e90aa86df162841.tar.gz
hdf5-ec8ad09125032c9c232878d02e90aa86df162841.tar.bz2
Source formatted
Diffstat (limited to 'src/H5Tdeprec.c')
-rw-r--r--src/H5Tdeprec.c65
1 files changed, 27 insertions, 38 deletions
diff --git a/src/H5Tdeprec.c b/src/H5Tdeprec.c
index 17e4a82..7b24b79 100644
--- a/src/H5Tdeprec.c
+++ b/src/H5Tdeprec.c
@@ -29,59 +29,50 @@
/* Module Setup */
/****************/
-#include "H5Tmodule.h" /* This source code file is part of the H5T module */
-
+#include "H5Tmodule.h" /* This source code file is part of the H5T module */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5ACprivate.h" /* Metadata cache */
-#include "H5CXprivate.h" /* API Contexts */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FOprivate.h" /* File objects */
-#include "H5Iprivate.h" /* IDs */
-#include "H5Ppublic.h" /* Property Lists */
-#include "H5Tpkg.h" /* Datatypes */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5ACprivate.h" /* Metadata cache */
+#include "H5CXprivate.h" /* API Contexts */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FOprivate.h" /* File objects */
+#include "H5Iprivate.h" /* IDs */
+#include "H5Ppublic.h" /* Property Lists */
+#include "H5Tpkg.h" /* Datatypes */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Package Typedefs */
/********************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
#ifndef H5_NO_DEPRECATED_SYMBOLS
-
+
/*-------------------------------------------------------------------------
* Function: H5Tcommit1
*
@@ -100,34 +91,33 @@
herr_t
H5Tcommit1(hid_t loc_id, const char *name, hid_t type_id)
{
- H5G_loc_t loc; /* Location to create datatype */
- H5T_t *dt; /* Datatype for ID */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5G_loc_t loc; /* Location to create datatype */
+ H5T_t * dt; /* Datatype for ID */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE3("e", "i*si", loc_id, name, type_id);
/* Check arguments */
- if(H5G_loc(loc_id, &loc) < 0)
+ if (H5G_loc(loc_id, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if(!name || !*name)
+ if (!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
- if(NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
+ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
/* Set up collective metadata if appropriate */
- if(H5CX_set_loc(loc_id) < 0)
+ if (H5CX_set_loc(loc_id) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set access property list info")
/* Commit the datatype */
- if(H5T__commit_named(&loc, name, dt, H5P_LINK_CREATE_DEFAULT, H5P_DATATYPE_CREATE_DEFAULT) < 0)
+ if (H5T__commit_named(&loc, name, dt, H5P_LINK_CREATE_DEFAULT, H5P_DATATYPE_CREATE_DEFAULT) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to commit datatype")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tcommit1() */
-
/*-------------------------------------------------------------------------
* Function: H5Topen1
*
@@ -147,34 +137,33 @@ done:
hid_t
H5Topen1(hid_t loc_id, const char *name)
{
- H5T_t *type = NULL;
- H5G_loc_t loc;
- hid_t ret_value = H5I_INVALID_HID; /* Return value */
+ H5T_t * type = NULL;
+ H5G_loc_t loc;
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE2("i", "i*s", loc_id, name);
/* Check args */
- if(H5G_loc(loc_id, &loc) < 0)
+ if (H5G_loc(loc_id, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a location")
- if(!name || !*name)
+ if (!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "no name")
/* Open the datatype */
- if(NULL == (type = H5T__open_name(&loc, name)))
+ if (NULL == (type = H5T__open_name(&loc, name)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open named datatype")
/* Register the type and return the ID */
- if((ret_value = H5I_register(H5I_DATATYPE, type, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_DATATYPE, type, TRUE)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register named datatype")
done:
/* Cleanup on error */
- if(H5I_INVALID_HID == ret_value)
- if(type && H5T_close(type) < 0)
+ if (H5I_INVALID_HID == ret_value)
+ if (type && H5T_close(type) < 0)
HDONE_ERROR(H5E_DATATYPE, H5E_CLOSEERROR, H5I_INVALID_HID, "unable to close datatype")
FUNC_LEAVE_API(ret_value)
} /* end H5Topen1() */
#endif /* H5_NO_DEPRECATED_SYMBOLS */
-