summaryrefslogtreecommitdiffstats
path: root/src/H5T.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2001-08-15 14:54:05 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2001-08-15 14:54:05 (GMT)
commit81cde8e325d01f68a02837429fec7ffb961e3d5a (patch)
treee3355629c3bde3e6b02623c37a9fb6ee6123f13e /src/H5T.c
parent44b651ac6cc7d20abfb88cfeb833578d0224bb04 (diff)
downloadhdf5-81cde8e325d01f68a02837429fec7ffb961e3d5a.zip
hdf5-81cde8e325d01f68a02837429fec7ffb961e3d5a.tar.gz
hdf5-81cde8e325d01f68a02837429fec7ffb961e3d5a.tar.bz2
[svn-r4360] Purpose:
Code cleanup (sorta) Description: When the first versions of the HDF5 library were designed, I remembered vividly the difficulties of porting code from a 32-bit platform to a 16-bit platform and asked that people use intn & uintn instead of int & unsigned int, respectively. However, in hindsight, this was overkill and unnecessary since we weren't going to be porting the HDF5 library to 16-bit architectures. Currently, the extra uintn & intn typedefs are causing problems for users who'd like to include both the HDF5 and HDF4 header files in one source module (like Kent's h4toh5 library). (Merged from the same changes to development branch) Solution: Changed the uintn & intn's to unsigned and int's respectively. Platforms tested: FreeBSD 4.4 (hawkwind)
Diffstat (limited to 'src/H5T.c')
-rw-r--r--src/H5T.c96
1 files changed, 48 insertions, 48 deletions
diff --git a/src/H5T.c b/src/H5T.c
index f029b70..1ce5fdc 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -25,7 +25,7 @@
#define H5T_COMPND_INC 64 /*typical max numb of members per struct */
/* Interface initialization */
-static intn interface_initialize_g = 0;
+static int interface_initialize_g = 0;
#define INTERFACE_INIT H5T_init_interface
static herr_t H5T_init_interface(void);
@@ -183,11 +183,11 @@ size_t H5T_NATIVE_UINT_FAST64_ALIGN_g = 0;
* which is used as the key by which the `entries' array is sorted.
*/
static struct {
- intn npaths; /*number of paths defined */
- intn apaths; /*number of paths allocated */
+ int npaths; /*number of paths defined */
+ int apaths; /*number of paths allocated */
H5T_path_t **path; /*sorted array of path pointers */
- intn nsoft; /*number of soft conversions defined */
- intn asoft; /*number of soft conversions allocated */
+ int nsoft; /*number of soft conversions defined */
+ int asoft; /*number of soft conversions allocated */
H5T_soft_t *soft; /*unsorted array of soft conversions */
} H5T_g;
@@ -195,7 +195,7 @@ static struct {
H5T_overflow_t H5T_overflow_g = NULL;
/* Local static functions */
-static herr_t H5T_print_stats(H5T_path_t *path, intn *nprint/*in,out*/);
+static herr_t H5T_print_stats(H5T_path_t *path, int *nprint/*in,out*/);
/* Declare the free list for H5T_t's */
H5FL_DEFINE(H5T_t);
@@ -1327,7 +1327,7 @@ H5T_init_interface(void)
*
*-------------------------------------------------------------------------
*/
-static intn
+static int
H5T_unlock_cb (void *_dt, const void UNUSED *key)
{
H5T_t *dt = (H5T_t *)_dt;
@@ -1361,10 +1361,10 @@ H5T_unlock_cb (void *_dt, const void UNUSED *key)
* called.
*-------------------------------------------------------------------------
*/
-intn
+int
H5T_term_interface(void)
{
- intn i, nprint=0, n=0;
+ int i, nprint=0, n=0;
H5T_path_t *path = NULL;
if (interface_initialize_g) {
@@ -1928,7 +1928,7 @@ H5Tdetect_class(hid_t type, H5T_class_t cls)
htri_t
H5T_detect_class (H5T_t *dt, H5T_class_t cls)
{
- intn i;
+ int i;
FUNC_ENTER (H5T_detect_class, FAIL);
@@ -3273,7 +3273,7 @@ int
H5Tget_nmembers(hid_t type_id)
{
H5T_t *dt = NULL;
- intn ret_value = FAIL;
+ int ret_value = FAIL;
FUNC_ENTER(H5Tget_num_members, FAIL);
H5TRACE1("Is","i",type_id);
@@ -3432,7 +3432,7 @@ H5Tget_member_dims(hid_t type_id, int membno,
size_t dims[]/*out*/, int perm[]/*out*/)
{
H5T_t *dt = NULL;
- intn ndims, i;
+ int ndims, i;
FUNC_ENTER(H5Tget_member_dims, FAIL);
H5TRACE4("Is","iIsxx",type_id,membno,dims,perm);
@@ -3679,7 +3679,7 @@ H5Tinsert_array(hid_t parent_id, const char *name, size_t offset,
H5T_t *member = NULL; /*the atomic member type */
H5T_t *array = NULL; /*the array type */
hsize_t newdim[H5S_MAX_RANK]; /* Array to hold the dimensions */
- intn i;
+ int i;
FUNC_ENTER(H5Tinsert_array, FAIL);
H5TRACE7("e","iszIs*[a3]z*Isi",parent_id,name,offset,ndims,dim,perm,
@@ -4266,8 +4266,8 @@ H5Tregister(H5T_pers_t pers, const char *name, hid_t src_id, hid_t dst_id,
H5T_path_t *old_path=NULL; /*existing conversion path */
H5T_path_t *new_path=NULL; /*new conversion path */
H5T_cdata_t cdata; /*temporary conversion data */
- intn nprint=0; /*number of paths shut down */
- intn i; /*counter */
+ int nprint=0; /*number of paths shut down */
+ int i; /*counter */
herr_t ret_value=FAIL; /*return value */
FUNC_ENTER(H5Tregister, FAIL);
@@ -4323,7 +4323,7 @@ H5Tregister(H5T_pers_t pers, const char *name, hid_t src_id, hid_t dst_id,
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed");
}
- H5T_g.asoft = (intn)na;
+ H5T_g.asoft = (int)na;
H5T_g.soft = x;
}
HDstrncpy (H5T_g.soft[H5T_g.nsoft].name, name, H5T_NAMELEN);
@@ -4453,8 +4453,8 @@ H5T_unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst,
{
H5T_path_t *path = NULL; /*conversion path */
H5T_soft_t *soft = NULL; /*soft conversion information */
- intn nprint=0; /*number of paths shut down */
- intn i; /*counter */
+ int nprint=0; /*number of paths shut down */
+ int i; /*counter */
FUNC_ENTER(H5T_unregister, FAIL);
@@ -4988,7 +4988,7 @@ H5T_t *
H5T_copy(const H5T_t *old_dt, H5T_copy_t method)
{
H5T_t *new_dt=NULL, *tmp=NULL;
- intn i;
+ int i;
char *s;
FUNC_ENTER(H5T_copy, NULL);
@@ -5051,7 +5051,7 @@ H5T_copy(const H5T_t *old_dt, H5T_copy_t method)
switch(new_dt->type) {
case H5T_COMPOUND:
{
- intn accum_change=0; /* Amount of change in the offset of the fields */
+ int accum_change=0; /* Amount of change in the offset of the fields */
/*
* Copy all member fields to new type, then overwrite the
@@ -5069,8 +5069,8 @@ H5T_copy(const H5T_t *old_dt, H5T_copy_t method)
new_dt->u.compnd.nmembs * sizeof(H5T_cmemb_t));
for (i=0; i<new_dt->u.compnd.nmembs; i++) {
- intn j;
- intn old_match;
+ int j;
+ int old_match;
s = new_dt->u.compnd.memb[i].name;
new_dt->u.compnd.memb[i].name = H5MM_xstrdup(s);
@@ -5303,7 +5303,7 @@ H5T_lock (H5T_t *dt, hbool_t immutable)
herr_t
H5T_close(H5T_t *dt)
{
- intn i;
+ int i;
H5T_t *parent = dt->parent;
FUNC_ENTER(H5T_close, FAIL);
@@ -5774,7 +5774,7 @@ H5T_set_offset(H5T_t *dt, size_t offset)
herr_t
H5T_insert(H5T_t *parent, const char *name, size_t offset, const H5T_t *member)
{
- intn idx, i;
+ int idx, i;
size_t total_size;
FUNC_ENTER(H5T_insert, FAIL);
@@ -5816,7 +5816,7 @@ H5T_insert(H5T_t *parent, const char *name, size_t offset, const H5T_t *member)
HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed");
}
- parent->u.compnd.nalloc = (intn)na;
+ parent->u.compnd.nalloc = (int)na;
parent->u.compnd.memb = x;
}
@@ -6157,7 +6157,7 @@ H5T_enum_insert(H5T_t *dt, const char *name, void *value)
/* Increase table sizes */
if (dt->u.enumer.nmembs >= dt->u.enumer.nalloc) {
- intn n = MAX(32, 2*dt->u.enumer.nalloc);
+ int n = MAX(32, 2*dt->u.enumer.nalloc);
if (NULL==(names=H5MM_realloc(dt->u.enumer.name, n*sizeof(char*)))) {
HRETURN_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed");
@@ -6210,8 +6210,8 @@ H5T_enum_insert(H5T_t *dt, const char *name, void *value)
char *
H5T_enum_nameof(H5T_t *dt, void *value, char *name/*out*/, size_t size)
{
- intn lt, md, rt; /*indices for binary search */
- intn cmp; /*comparison result */
+ int lt, md, rt; /*indices for binary search */
+ int cmp; /*comparison result */
FUNC_ENTER(H5T_enum_nameof, NULL);
@@ -6279,8 +6279,8 @@ H5T_enum_nameof(H5T_t *dt, void *value, char *name/*out*/, size_t size)
herr_t
H5T_enum_valueof(H5T_t *dt, const char *name, void *value/*out*/)
{
- intn lt, md, rt; /*indices for binary search */
- intn cmp; /*comparison result */
+ int lt, md, rt; /*indices for binary search */
+ int cmp; /*comparison result */
FUNC_ENTER(H5T_enum_nameof, FAIL);
@@ -6338,12 +6338,12 @@ H5T_enum_valueof(H5T_t *dt, const char *name, void *value/*out*/)
* Compares bitfields and opaque types.
*-------------------------------------------------------------------------
*/
-intn
+int
H5T_cmp(const H5T_t *dt1, const H5T_t *dt2)
{
- intn *idx1 = NULL, *idx2 = NULL;
- intn ret_value = 0;
- intn i, j, tmp;
+ int *idx1 = NULL, *idx2 = NULL;
+ int ret_value = 0;
+ int i, j, tmp;
hbool_t swapped;
size_t base_size;
@@ -6380,8 +6380,8 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2)
HGOTO_DONE(1);
/* Build an index for each type so the names are sorted */
- if (NULL==(idx1 = H5MM_malloc(dt1->u.compnd.nmembs * sizeof(intn))) ||
- NULL==(idx2 = H5MM_malloc(dt1->u.compnd.nmembs * sizeof(intn)))) {
+ if (NULL==(idx1 = H5MM_malloc(dt1->u.compnd.nmembs * sizeof(int))) ||
+ NULL==(idx2 = H5MM_malloc(dt1->u.compnd.nmembs * sizeof(int)))) {
HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, 0,
"memory allocation failed");
}
@@ -6456,8 +6456,8 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2)
HGOTO_DONE(1);
/* Build an index for each type so the names are sorted */
- if (NULL==(idx1 = H5MM_malloc(dt1->u.enumer.nmembs * sizeof(intn))) ||
- NULL==(idx2 = H5MM_malloc(dt1->u.enumer.nmembs * sizeof(intn)))) {
+ if (NULL==(idx1 = H5MM_malloc(dt1->u.enumer.nmembs * sizeof(int))) ||
+ NULL==(idx2 = H5MM_malloc(dt1->u.enumer.nmembs * sizeof(int)))) {
HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, 0,
"memory allocation failed");
}
@@ -6741,15 +6741,15 @@ H5T_path_t *
H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name,
H5T_conv_t func)
{
- intn lt, rt; /*left and right edges */
- intn md; /*middle */
- intn cmp; /*comparison result */
+ int lt, rt; /*left and right edges */
+ int md; /*middle */
+ int cmp; /*comparison result */
H5T_path_t *table=NULL; /*path existing in the table */
H5T_path_t *path=NULL; /*new path */
H5T_path_t *ret_value=NULL; /*return value */
hid_t src_id=-1, dst_id=-1; /*src and dst type identifiers */
- intn i; /*counter */
- intn nprint=0; /*lines of output printed */
+ int i; /*counter */
+ int nprint=0; /*lines of output printed */
FUNC_ENTER(H5T_path_find, NULL);
assert((!src && !dst) || (src && dst));
@@ -6944,7 +6944,7 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name,
HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL,
"memory allocation failed");
}
- H5T_g.apaths = (intn)na;
+ H5T_g.apaths = (int)na;
H5T_g.path = x;
}
if (cmp>0) md++;
@@ -7151,7 +7151,7 @@ H5Tarray_create(hid_t base_id, int ndims, const hsize_t dim[/* ndims */],
{
H5T_t *base = NULL; /* base data type */
H5T_t *dt = NULL; /* new array data type */
- intn i; /* local index variable */
+ int i; /* local index variable */
hid_t ret_value = FAIL; /* return value */
FUNC_ENTER(H5Tarray_create, FAIL);
@@ -7206,7 +7206,7 @@ H5T_array_create(H5T_t *base, int ndims, const hsize_t dim[/* ndims */],
const int perm[/* ndims */])
{
H5T_t *ret_value = NULL; /*new array data type */
- intn i; /* local index variable */
+ int i; /* local index variable */
FUNC_ENTER(H5T_array_create, NULL);
@@ -7308,7 +7308,7 @@ H5Tget_array_dims(hid_t type_id, hsize_t dims[], int perm[])
{
H5T_t *dt = NULL; /* pointer to array data type */
herr_t ret_value = SUCCEED; /* return value */
- intn i; /* Local index variable */
+ int i; /* Local index variable */
FUNC_ENTER(H5Tget_array_dims, FAIL);
H5TRACE3("e","i*h*Is",type_id,dims,perm);
@@ -7360,7 +7360,7 @@ H5Tget_array_dims(hid_t type_id, hsize_t dims[], int perm[])
*-------------------------------------------------------------------------
*/
static herr_t
-H5T_print_stats(H5T_path_t UNUSED *path, intn UNUSED *nprint/*in,out*/)
+H5T_print_stats(H5T_path_t UNUSED *path, int UNUSED *nprint/*in,out*/)
{
#ifdef H5T_DEBUG
hsize_t nbytes;