summaryrefslogtreecommitdiffstats
path: root/src/H5Tnative.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-10-09 04:18:18 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-10-09 04:18:18 (GMT)
commit14dcb6db33f88011c3499d439c53890ab09d1ba2 (patch)
treecc05060f7dd94342c2e06726ef6b550bf4a7d8f1 /src/H5Tnative.c
parent20720af231c875330a6074f65ee1c54e6a806fbb (diff)
downloadhdf5-14dcb6db33f88011c3499d439c53890ab09d1ba2.zip
hdf5-14dcb6db33f88011c3499d439c53890ab09d1ba2.tar.gz
hdf5-14dcb6db33f88011c3499d439c53890ab09d1ba2.tar.bz2
[svn-r12736] Description:
Add "use the latest format" support for dataspace object header encode/ decode routines and clean up format a bit for the latest format (new to 1.8.x releases) Remove storing 'perm' parameter for array datatypes in memory and the file, and add test to make certain that if any user applications are attempting to store them, we get some reports back. (Should be unlikely, since the RefMan says that the parameter is not implemented and is unsupported). Carry those changes into the tests, etc. Clean up a bunch more compiler warnings. Tested on: FreeBSD/32 4.11 (sleipnir) w/threadsafe Linux/32 2.4 (heping) w/FORTRAN & C++ Linux/64 2.4 (mir) w/enable-1.6-compat
Diffstat (limited to 'src/H5Tnative.c')
-rw-r--r--src/H5Tnative.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/H5Tnative.c b/src/H5Tnative.c
index 56694c2..fb525dc 100644
--- a/src/H5Tnative.c
+++ b/src/H5Tnative.c
@@ -167,10 +167,10 @@ H5T_get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_alig
assert(dtype);
- if((h5_class = H5T_get_class(dtype, FALSE))==H5T_NO_CLASS)
+ if((h5_class = H5T_get_class(dtype, FALSE)) == H5T_NO_CLASS)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a valid class")
- if((size = H5T_get_size(dtype))==0)
+ if((size = H5T_get_size(dtype)) == 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a valid size")
switch(h5_class) {
@@ -336,9 +336,9 @@ H5T_get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_alig
/* Don't need to do anything special for alignment, offset since the ENUM type usually is integer. */
- /* Retrieve base type for enumarate type */
+ /* Retrieve base type for enumerated type */
if((super_type=H5T_get_super(dtype))==NULL)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unable to get base type for enumarate type")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unable to get base type for enumerate type")
if((nat_super_type = H5T_get_native_type(super_type, direction, struct_align, offset, comp_size))==NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "base native type retrieval failed")
@@ -359,7 +359,7 @@ H5T_get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_alig
/* Retrieve member info and insert members into new enum type */
if((snmemb = H5T_get_nmembers(dtype))<=0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "enumarate data type doesn't have any member")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "enumerate data type doesn't have any member")
H5_ASSIGN_OVERFLOW(nmemb,snmemb,int,unsigned);
for(i=0; i<nmemb; i++) {
if((memb_name=H5T_get_member_name(dtype, i))==NULL)
@@ -400,37 +400,37 @@ H5T_get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_alig
size_t super_align=0;
/* Retrieve dimension information for array data type */
- if((sarray_rank=H5T_get_array_ndims(dtype))<=0)
+ if((sarray_rank = H5T_get_array_ndims(dtype)) <= 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot get dimension rank")
- H5_ASSIGN_OVERFLOW(array_rank,sarray_rank,int,unsigned);
- if((dims = (hsize_t*)H5MM_malloc(array_rank*sizeof(hsize_t)))==NULL)
+ H5_ASSIGN_OVERFLOW(array_rank, sarray_rank, int, unsigned);
+ if((dims = (hsize_t*)H5MM_malloc(array_rank * sizeof(hsize_t))) == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot allocate memory")
- if(H5T_get_array_dims(dtype, dims, NULL)<0)
+ if(H5T_get_array_dims(dtype, dims) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot get dimension size")
/* Retrieve base type for array type */
- if((super_type=H5T_get_super(dtype))==NULL)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unable to get parent type for enumarate type")
+ if((super_type = H5T_get_super(dtype)) == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unable to get parent type for array type")
if((nat_super_type = H5T_get_native_type(super_type, direction, &super_align,
- &super_offset, &super_size))==NULL)
+ &super_offset, &super_size)) == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "parent native type retrieval failed")
/* Close super type */
- if(H5T_close(super_type)<0)
+ if(H5T_close(super_type) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_CLOSEERROR, NULL, "cannot close datatype")
/* Create a new array type based on native type */
- if((new_type=H5T_array_create(nat_super_type, sarray_rank, dims, NULL))==NULL)
+ if((new_type = H5T_array_create(nat_super_type, array_rank, dims)) == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unable to create array type")
/* Close base type */
- if(H5T_close(nat_super_type)<0)
+ if(H5T_close(nat_super_type) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_CLOSEERROR, NULL, "cannot close datatype")
- for(i=0; i<array_rank; i++)
+ for(i = 0; i < array_rank; i++)
nelems *= dims[i];
- H5_CHECK_OVERFLOW(nelems,hsize_t,size_t);
- if(H5T_cmp_offset(comp_size, offset, super_size, (size_t)nelems, super_align, struct_align)<0)
+ H5_CHECK_OVERFLOW(nelems, hsize_t, size_t);
+ if(H5T_cmp_offset(comp_size, offset, super_size, (size_t)nelems, super_align, struct_align) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset")
H5MM_xfree(dims);
@@ -446,7 +446,7 @@ H5T_get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_alig
/* Retrieve base type for array type */
if((super_type=H5T_get_super(dtype))==NULL)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unable to get parent type for enumarate type")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unable to get parent type for VL type")
/* Don't need alignment, offset information if this VL isn't a field of compound type. If it
* is, go to a few steps below to compute the information directly. */
if((nat_super_type = H5T_get_native_type(super_type, direction, NULL, NULL, &super_size))==NULL)