diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2005-08-13 20:53:35 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2005-08-13 20:53:35 (GMT) |
commit | 6b45f5172ccb4311e0be9ae15da3758abb6b0e67 (patch) | |
tree | 5a7a112fe7a8a98c6fecb45b513789d15962eb3d /src/H5T.c | |
parent | 6562465a2c2a58cfbc2f47bf60bb538f7a783933 (diff) | |
download | hdf5-6b45f5172ccb4311e0be9ae15da3758abb6b0e67.zip hdf5-6b45f5172ccb4311e0be9ae15da3758abb6b0e67.tar.gz hdf5-6b45f5172ccb4311e0be9ae15da3758abb6b0e67.tar.bz2 |
[svn-r11245] Purpose:
Code cleanup
Description:
Trim trailing whitespace, which is making 'diff'ing the two branches
difficult.
Solution:
Ran this script in each directory:
foreach f (*.[ch] *.cpp)
sed 's/[[:blank:]]*$//' $f > sed.out && mv sed.out $f
end
Platforms tested:
FreeBSD 4.11 (sleipnir)
Too minor to require h5committest
Diffstat (limited to 'src/H5T.c')
-rw-r--r-- | src/H5T.c | 246 |
1 files changed, 123 insertions, 123 deletions
@@ -147,7 +147,7 @@ hid_t H5T_NATIVE_UINT_FAST64_g = FAIL; /* * Alignment constraints for native types. These are initialized at run time - * in H5Tinit.c. These alignments are mainly for offsets in HDF5 compound + * in H5Tinit.c. These alignments are mainly for offsets in HDF5 compound * datatype or C structures, which are different from the alignments for memory * address below this group of variables. */ @@ -660,7 +660,7 @@ NAME H5T_init_interface -- Initialize interface-specific information USAGE herr_t H5T_init_interface() - + RETURNS Non-negative on success/Negative on failure DESCRIPTION @@ -764,30 +764,30 @@ H5T_init_interface(void) /*------------------------------------------------------------ * Native types - *------------------------------------------------------------ + *------------------------------------------------------------ */ /* 1-byte bit field */ H5T_INIT_TYPE(BITFIELD,H5T_NATIVE_B8_g,COPY,native_uint,SET,1) - + /* 2-byte bit field */ H5T_INIT_TYPE(BITFIELD,H5T_NATIVE_B16_g,COPY,native_uint,SET,2) - + /* 4-byte bit field */ H5T_INIT_TYPE(BITFIELD,H5T_NATIVE_B32_g,COPY,native_uint,SET,4) - + /* 8-byte bit field */ H5T_INIT_TYPE(BITFIELD,H5T_NATIVE_B64_g,COPY,native_uint,SET,8) - + /* haddr_t */ H5T_INIT_TYPE(OFFSET,H5T_NATIVE_HADDR_g,COPY,native_uint,SET,sizeof(haddr_t)) /* hsize_t */ H5T_INIT_TYPE(OFFSET,H5T_NATIVE_HSIZE_g,COPY,native_uint,SET,sizeof(hsize_t)) - + /* hssize_t */ H5T_INIT_TYPE(OFFSET,H5T_NATIVE_HSSIZE_g,COPY,native_int,SET,sizeof(hssize_t)) - + /* herr_t */ H5T_INIT_TYPE(OFFSET,H5T_NATIVE_HERR_g,COPY,native_int,SET,sizeof(herr_t)) @@ -796,7 +796,7 @@ H5T_init_interface(void) /*------------------------------------------------------------ * IEEE Types - *------------------------------------------------------------ + *------------------------------------------------------------ */ /* IEEE 4-byte little-endian float */ @@ -814,69 +814,69 @@ H5T_init_interface(void) /*------------------------------------------------------------ * Other "standard" types - *------------------------------------------------------------ + *------------------------------------------------------------ */ /* 1-byte little-endian (endianness is irrelevant) signed integer */ H5T_INIT_TYPE(SINTLE,H5T_STD_I8LE_g,COPY,native_int,SET,1) - + /* 1-byte big-endian (endianness is irrelevant) signed integer */ H5T_INIT_TYPE(SINTBE,H5T_STD_I8BE_g,COPY,native_int,SET,1) - + /* 2-byte little-endian signed integer */ H5T_INIT_TYPE(SINTLE,H5T_STD_I16LE_g,COPY,native_int,SET,2) - + /* 2-byte big-endian signed integer */ H5T_INIT_TYPE(SINTBE,H5T_STD_I16BE_g,COPY,native_int,SET,2) - + /* 4-byte little-endian signed integer */ H5T_INIT_TYPE(SINTLE,H5T_STD_I32LE_g,COPY,native_int,SET,4) std_i32le=dt; /* Keep type for later */ - + /* 4-byte big-endian signed integer */ H5T_INIT_TYPE(SINTBE,H5T_STD_I32BE_g,COPY,native_int,SET,4) - + /* 8-byte little-endian signed integer */ H5T_INIT_TYPE(SINTLE,H5T_STD_I64LE_g,COPY,native_int,SET,8) - + /* 8-byte big-endian signed integer */ H5T_INIT_TYPE(SINTBE,H5T_STD_I64BE_g,COPY,native_int,SET,8) - + /* 1-byte little-endian (endianness is irrelevant) unsigned integer */ H5T_INIT_TYPE(UINTLE,H5T_STD_U8LE_g,COPY,native_uint,SET,1) std_u8le=dt; /* Keep type for later */ - + /* 1-byte big-endian (endianness is irrelevant) unsigned integer */ H5T_INIT_TYPE(UINTBE,H5T_STD_U8BE_g,COPY,native_uint,SET,1) std_u8be=dt; /* Keep type for later */ - + /* 2-byte little-endian unsigned integer */ H5T_INIT_TYPE(UINTLE,H5T_STD_U16LE_g,COPY,native_uint,SET,2) std_u16le=dt; /* Keep type for later */ - + /* 2-byte big-endian unsigned integer */ H5T_INIT_TYPE(UINTBE,H5T_STD_U16BE_g,COPY,native_uint,SET,2) std_u16be=dt; /* Keep type for later */ - + /* 4-byte little-endian unsigned integer */ H5T_INIT_TYPE(UINTLE,H5T_STD_U32LE_g,COPY,native_uint,SET,4) std_u32le=dt; /* Keep type for later */ - + /* 4-byte big-endian unsigned integer */ H5T_INIT_TYPE(UINTBE,H5T_STD_U32BE_g,COPY,native_uint,SET,4) std_u32be=dt; /* Keep type for later */ - + /* 8-byte little-endian unsigned integer */ H5T_INIT_TYPE(UINTLE,H5T_STD_U64LE_g,COPY,native_uint,SET,8) std_u64le=dt; /* Keep type for later */ - + /* 8-byte big-endian unsigned integer */ H5T_INIT_TYPE(UINTBE,H5T_STD_U64BE_g,COPY,native_uint,SET,8) std_u64be=dt; /* Keep type for later */ /*------------------------------------------------------------ * Little- & Big-endian bitfields - *------------------------------------------------------------ + *------------------------------------------------------------ */ /* little-endian (order is irrelevant) 8-bit bitfield */ @@ -906,7 +906,7 @@ H5T_init_interface(void) /*------------------------------------------------------------ * The Unix architecture for dates and times. - *------------------------------------------------------------ + *------------------------------------------------------------ */ /* Little-endian 32-bit UNIX time_t */ @@ -932,7 +932,7 @@ H5T_init_interface(void) /*------------------------------------------------------------ * The `C' architecture - *------------------------------------------------------------ + *------------------------------------------------------------ */ /* One-byte character string */ @@ -941,7 +941,7 @@ H5T_init_interface(void) /*------------------------------------------------------------ * The `Fortran' architecture - *------------------------------------------------------------ + *------------------------------------------------------------ */ /* One-byte character string */ @@ -949,13 +949,13 @@ H5T_init_interface(void) /*------------------------------------------------------------ * Pointer types - *------------------------------------------------------------ + *------------------------------------------------------------ */ /* Object pointer (i.e. object header address in file) */ H5T_INIT_TYPE(OBJREF,H5T_STD_REF_OBJ_g,ALLOC,-,SET,H5R_OBJ_REF_BUF_SIZE) objref=dt; /* Keep type for later */ - + /* Dataset Region pointer (i.e. selection inside a dataset) */ H5T_INIT_TYPE(REGREF,H5T_STD_REF_DSETREG_g,ALLOC,-,SET,H5R_DSET_REG_REF_BUF_SIZE) @@ -1031,7 +1031,7 @@ H5T_init_interface(void) status |= H5T_register(H5T_PERS_HARD, "llong_uchar", native_llong, native_uchar, H5T_conv_llong_uchar, H5AC_dxpl_id); status |= H5T_register(H5T_PERS_HARD, "ullong_schar", native_ullong, native_schar, H5T_conv_ullong_schar, H5AC_dxpl_id); status |= H5T_register(H5T_PERS_HARD, "ullong_uchar", native_ullong, native_uchar, H5T_conv_ullong_uchar, H5AC_dxpl_id); - + /* From long */ status |= H5T_register(H5T_PERS_HARD, "long_llong", native_long, native_llong, H5T_conv_long_llong, H5AC_dxpl_id); status |= H5T_register(H5T_PERS_HARD, "long_ullong", native_long, native_ullong, H5T_conv_long_ullong, H5AC_dxpl_id); @@ -1051,7 +1051,7 @@ H5T_init_interface(void) status |= H5T_register(H5T_PERS_HARD, "long_uchar", native_long, native_uchar, H5T_conv_long_uchar, H5AC_dxpl_id); status |= H5T_register(H5T_PERS_HARD, "ulong_schar", native_ulong, native_schar, H5T_conv_ulong_schar, H5AC_dxpl_id); status |= H5T_register(H5T_PERS_HARD, "ulong_uchar", native_ulong, native_uchar, H5T_conv_ulong_uchar, H5AC_dxpl_id); - + /* From short */ status |= H5T_register(H5T_PERS_HARD, "short_llong", native_short, native_llong, H5T_conv_short_llong, H5AC_dxpl_id); status |= H5T_register(H5T_PERS_HARD, "short_ullong", native_short, native_ullong, H5T_conv_short_ullong, H5AC_dxpl_id); @@ -1071,7 +1071,7 @@ H5T_init_interface(void) status |= H5T_register(H5T_PERS_HARD, "short_uchar", native_short, native_uchar, H5T_conv_short_uchar, H5AC_dxpl_id); status |= H5T_register(H5T_PERS_HARD, "ushort_schar", native_ushort, native_schar, H5T_conv_ushort_schar, H5AC_dxpl_id); status |= H5T_register(H5T_PERS_HARD, "ushort_uchar", native_ushort, native_uchar, H5T_conv_ushort_uchar, H5AC_dxpl_id); - + /* From int */ status |= H5T_register(H5T_PERS_HARD, "int_llong", native_int, native_llong, H5T_conv_int_llong, H5AC_dxpl_id); status |= H5T_register(H5T_PERS_HARD, "int_ullong", native_int, native_ullong, H5T_conv_int_ullong, H5AC_dxpl_id); @@ -1132,7 +1132,7 @@ H5T_init_interface(void) #if H5_SW_INTEGER_TO_LDOUBLE_WORKS status |= H5T_register(H5T_PERS_HARD, "short_ldbl", native_short, native_ldouble, H5T_conv_short_ldouble, H5AC_dxpl_id); #endif /*H5_SW_INTEGER_TO_LDOUBLE_WORKS*/ - + /* From unsigned short to floats */ status |= H5T_register(H5T_PERS_HARD, "ushort_flt", native_ushort, native_float, H5T_conv_ushort_float, H5AC_dxpl_id); status |= H5T_register(H5T_PERS_HARD, "ushort_dbl", native_ushort, native_double, H5T_conv_ushort_double, H5AC_dxpl_id); @@ -1146,7 +1146,7 @@ H5T_init_interface(void) #if H5_SW_INTEGER_TO_LDOUBLE_WORKS status |= H5T_register(H5T_PERS_HARD, "int_ldbl", native_int, native_ldouble, H5T_conv_int_ldouble, H5AC_dxpl_id); #endif /*H5_SW_INTEGER_TO_LDOUBLE_WORKS*/ - + /* From unsigned int to floats */ status |= H5T_register(H5T_PERS_HARD, "uint_flt", native_uint, native_float, H5T_conv_uint_float, H5AC_dxpl_id); status |= H5T_register(H5T_PERS_HARD, "uint_dbl", native_uint, native_double, H5T_conv_uint_double, H5AC_dxpl_id); @@ -1160,7 +1160,7 @@ H5T_init_interface(void) #if H5_SW_INTEGER_TO_LDOUBLE_WORKS status |= H5T_register(H5T_PERS_HARD, "long_ldbl", native_long, native_ldouble, H5T_conv_long_ldouble, H5AC_dxpl_id); #endif /*H5_SW_INTEGER_TO_LDOUBLE_WORKS*/ - + /* From unsigned long to floats */ #if H5_SW_ULONG_TO_FP_BOTTOM_BIT_WORKS status |= H5T_register(H5T_PERS_HARD, "ulong_flt", native_ulong, native_float, H5T_conv_ulong_float, H5AC_dxpl_id); @@ -1176,7 +1176,7 @@ H5T_init_interface(void) #if H5_SW_INTEGER_TO_LDOUBLE_WORKS status |= H5T_register(H5T_PERS_HARD, "llong_ldbl", native_llong, native_ldouble, H5T_conv_llong_ldouble, H5AC_dxpl_id); #endif /* H5_SW_INTEGER_TO_LDOUBLE_WORKS */ - + /* From unsigned long long to floats */ #if H5_ULLONG_TO_FP_CAST_WORKS && H5_SW_ULONG_TO_FP_BOTTOM_BIT_WORKS status |= H5T_register(H5T_PERS_HARD, "ullong_flt", native_ullong, native_float, H5T_conv_ullong_float, H5AC_dxpl_id); @@ -1199,7 +1199,7 @@ H5T_init_interface(void) #if H5_SW_LDOUBLE_TO_INTEGER_WORKS status |= H5T_register(H5T_PERS_HARD, "ldbl_uchar", native_ldouble, native_uchar, H5T_conv_ldouble_uchar, H5AC_dxpl_id); #endif /* H5_SW_LDOUBLE_TO_INTEGER_WORKS */ - + /* From floats to short */ status |= H5T_register(H5T_PERS_HARD, "flt_short", native_float, native_short, H5T_conv_float_short, H5AC_dxpl_id); status |= H5T_register(H5T_PERS_HARD, "dbl_short", native_double, native_short, H5T_conv_double_short, H5AC_dxpl_id); @@ -1213,7 +1213,7 @@ H5T_init_interface(void) #if H5_SW_LDOUBLE_TO_INTEGER_WORKS status |= H5T_register(H5T_PERS_HARD, "ldbl_ushort", native_ldouble, native_ushort, H5T_conv_ldouble_ushort, H5AC_dxpl_id); #endif /* H5_SW_LDOUBLE_TO_INTEGER_WORKS */ - + /* From floats to int */ status |= H5T_register(H5T_PERS_HARD, "flt_int", native_float, native_int, H5T_conv_float_int, H5AC_dxpl_id); status |= H5T_register(H5T_PERS_HARD, "dbl_int", native_double, native_int, H5T_conv_double_int, H5AC_dxpl_id); @@ -1245,7 +1245,7 @@ H5T_init_interface(void) #ifndef H5_HW_FP_TO_LLONG_NOT_WORKS status |= H5T_register(H5T_PERS_HARD, "flt_llong", native_float, native_llong, H5T_conv_float_llong, H5AC_dxpl_id); status |= H5T_register(H5T_PERS_HARD, "dbl_llong", native_double, native_llong, H5T_conv_double_llong, H5AC_dxpl_id); -#if H5_SW_LDOUBLE_TO_INTEGER_WORKS +#if H5_SW_LDOUBLE_TO_INTEGER_WORKS status |= H5T_register(H5T_PERS_HARD, "ldbl_llong", native_ldouble, native_llong, H5T_conv_ldouble_llong, H5AC_dxpl_id); #endif /* H5_SW_LDOUBLE_TO_INTEGER_WORKS */ #endif /* !H5_HW_FP_TO_LLONG_NOT_WORKS */ @@ -1271,7 +1271,7 @@ H5T_init_interface(void) if (status<0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to register conversion function(s)"); - + /* ========== Datatype Creation Property Class Initialization ============*/ assert(H5P_CLS_DATATYPE_CREATE_g!=-1); @@ -1339,7 +1339,7 @@ static int H5T_unlock_cb (void *_dt, hid_t UNUSED id, void UNUSED *key) { H5T_t *dt = (H5T_t *)_dt; - + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_unlock_cb); assert (dt); @@ -1534,9 +1534,9 @@ H5T_term_interface(void) * Failure: Negative * * Errors: - * ARGS BADVALUE Invalid size. - * DATATYPE CANTINIT Can't create type. - * DATATYPE CANTREGISTER Can't register data type atom. + * ARGS BADVALUE Invalid size. + * DATATYPE CANTINIT Can't create type. + * DATATYPE CANTREGISTER Can't register data type atom. * * Programmer: Robb Matzke * Friday, December 5, 1997 @@ -1596,7 +1596,7 @@ H5Topen(hid_t loc_id, const char *name) hbool_t ent_found = FALSE; /* Entry at 'name' found */ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl to use to open datatype */ hid_t ret_value =FAIL; - + FUNC_ENTER_API(H5Topen, FAIL); H5TRACE2("i","is",loc_id,name); @@ -1701,7 +1701,7 @@ H5Tcopy(hid_t type_id) /* Atomize result */ if ((ret_value = H5I_register(H5I_DATATYPE, new_dt)) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register data type atom"); - + done: if(ret_value<0) { if(new_dt!=NULL) @@ -1744,7 +1744,7 @@ H5Tclose(hid_t type_id) /* When the reference count reaches zero the resources are freed */ if (H5I_dec_ref(type_id) < 0) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "problem freeing id"); - + done: FUNC_LEAVE_API(ret_value); } @@ -1831,7 +1831,7 @@ H5Tlock(hid_t type_id) if (H5T_lock (dt, TRUE)<0) HGOTO_ERROR (H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to lock transient data type"); - + done: FUNC_LEAVE_API(ret_value); } @@ -1869,7 +1869,7 @@ H5Tget_class(hid_t type_id) /* Set return value */ ret_value= H5T_get_class(dt, FALSE); - + done: FUNC_LEAVE_API(ret_value); } @@ -1901,15 +1901,15 @@ H5T_get_class(const H5T_t *dt, htri_t internal) FUNC_ENTER_NOAPI(H5T_get_class, H5T_NO_CLASS); assert(dt); - + /* Lie to the user if they have a VL string and tell them it's in the string class */ if(dt->shared->type==H5T_VLEN && dt->shared->u.vlen.type==H5T_VLEN_STRING) ret_value=H5T_STRING; else ret_value=dt->shared->type; - /* Externally, a VL string is a string; internally, a VL string is a VL. */ - if(internal) { + /* Externally, a VL string is a string; internally, a VL string is a VL. */ + if(internal) { ret_value=dt->shared->type; } else { if(H5T_IS_VL_STRING(dt->shared)) @@ -1946,7 +1946,7 @@ H5Tdetect_class(hid_t type, H5T_class_t cls) FUNC_ENTER_API(H5Tdetect_class, FAIL); H5TRACE2("t","iTt",type,cls); - + /* Check args */ if (NULL == (dt = H5I_object_verify(type,H5I_DATATYPE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_NO_CLASS, "not a data type"); @@ -1987,7 +1987,7 @@ H5T_detect_class (const H5T_t *dt, H5T_class_t cls) htri_t ret_value=FALSE; /* Return value */ FUNC_ENTER_NOAPI(H5T_detect_class, FAIL); - + assert(dt); assert(cls>H5T_NO_CLASS && cls<H5T_NCLASSES); @@ -2048,7 +2048,7 @@ H5Tis_variable_str(hid_t dtype_id) FUNC_ENTER_API(H5Tis_variable_str, FAIL); H5TRACE1("t","i",dtype_id); - + /* Check args */ if (NULL == (dt = H5I_object_verify(dtype_id,H5I_DATATYPE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type"); @@ -2057,9 +2057,9 @@ H5Tis_variable_str(hid_t dtype_id) ret_value=H5T_IS_VL_STRING(dt->shared); done: - FUNC_LEAVE_API(ret_value); + FUNC_LEAVE_API(ret_value); } - + /*------------------------------------------------------------------------- * Function: H5Tget_size @@ -2091,7 +2091,7 @@ H5Tget_size(hid_t type_id) /* Check args */ if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a datatype"); - + /* size */ ret_value = H5T_get_size(dt); @@ -2184,7 +2184,7 @@ H5Tget_super(hid_t type) { H5T_t *dt=NULL, *super=NULL; hid_t ret_value; - + FUNC_ENTER_API(H5Tget_super, FAIL); H5TRACE1("i","i",type); @@ -2208,16 +2208,16 @@ done: /*------------------------------------------------------------------------- * Function: H5T_get_super * - * Purpose: Private function for H5Tget_super. Returns the type from - * which TYPE is derived. In the case of an enumeration type + * Purpose: Private function for H5Tget_super. Returns the type from + * which TYPE is derived. In the case of an enumeration type * the return value is an integer type. * * Return: Success: Data type for base data type. * - * Failure: NULL + * Failure: NULL * * Programmer: Raymond Lu - * October 9, 2002 + * October 9, 2002 * * Modifications: * @@ -2227,7 +2227,7 @@ H5T_t * H5T_get_super(H5T_t *dt) { H5T_t *ret_value=NULL; - + FUNC_ENTER_NOAPI(H5T_get_super, NULL); assert(dt); @@ -2290,7 +2290,7 @@ H5T_register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, /* Locate or create a new conversion path */ if (NULL==(new_path=H5T_path_find(src, dst, name, func, dxpl_id))) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to locate/allocate conversion path"); - + /* * Notify all other functions to recalculate private data since some * functions might cache a list of conversion functions. For @@ -2369,7 +2369,7 @@ H5T_register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, /* Free old path */ H5T_print_stats(old_path, &nprint); old_path->cdata.command = H5T_CONV_FREE; - if ((old_path->func)(tmp_sid, tmp_did, &(old_path->cdata), + if ((old_path->func)(tmp_sid, tmp_did, &(old_path->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL, dxpl_id)<0) { #ifdef H5T_DEBUG if (H5DEBUG(T)) { @@ -2392,7 +2392,7 @@ H5T_register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5E_clear_stack(NULL); } /* end for */ } /* end else */ - + done: if (ret_value<0) { if (new_path) { @@ -2643,7 +2643,7 @@ H5Tfind(hid_t src_id, hid_t dst_id, H5T_cdata_t **pcdata) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type"); if (!pcdata) HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, NULL, "no address to receive cdata pointer"); - + /* Find it */ if (NULL==(path=H5T_path_find(src, dst, NULL, NULL, H5AC_ind_dxpl_id))) HGOTO_ERROR(H5E_DATATYPE, H5E_NOTFOUND, NULL, "conversion function not found"); @@ -2653,7 +2653,7 @@ H5Tfind(hid_t src_id, hid_t dst_id, H5T_cdata_t **pcdata) /* Set return value */ ret_value = path->func; - + done: FUNC_LEAVE_API(ret_value); } @@ -2693,7 +2693,7 @@ H5Tconvert(hid_t src_id, hid_t dst_id, size_t nelmts, void *buf, H5T_path_t *tpath=NULL; /*type conversion info */ H5T_t *src=NULL, *dst=NULL; /*unatomized types */ herr_t ret_value=SUCCEED; /* Return value */ - + FUNC_ENTER_API(H5Tconvert, FAIL); H5TRACE6("e","iizxxi",src_id,dst_id,nelmts,buf,background,dxpl_id); @@ -2722,7 +2722,7 @@ done: /*------------------------------------------------------------------------- * Function: H5Tencode * - * Purpose: Given an datatype ID, converts the object description into + * Purpose: Given an datatype ID, converts the object description into * binary in a buffer. * * Return: Success: non-negative @@ -2742,7 +2742,7 @@ H5Tencode(hid_t obj_id, void *buf, size_t *nalloc) { H5T_t *dtype; herr_t ret_value=SUCCEED; - + FUNC_ENTER_API (H5Tencode, FAIL); H5TRACE3("e","ix*z",obj_id,buf,nalloc); @@ -2783,7 +2783,7 @@ H5Tdecode(const void *buf) { H5T_t *dt; hid_t ret_value; - + FUNC_ENTER_API (H5Tdecode, FAIL); H5TRACE1("i","x",buf); @@ -2792,7 +2792,7 @@ H5Tdecode(const void *buf) if((dt = H5T_decode(buf))==NULL) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "can't decode object"); - + /* Register the type and return the ID */ if ((ret_value=H5I_register (H5I_DATATYPE, dt))<0) HGOTO_ERROR (H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register data type"); @@ -2803,14 +2803,14 @@ done: /*------------------------------------------------------------------------- * API functions are above; library-private functions are below... - *------------------------------------------------------------------------- + *------------------------------------------------------------------------- */ /*------------------------------------------------------------------------- * Function: H5T_encode * - * Purpose: Private function for H5Tencode. Converts an object + * Purpose: Private function for H5Tencode. Converts an object * description into binary in a buffer. * * Return: Success: non-negative @@ -2833,7 +2833,7 @@ H5T_encode(H5T_t *obj, unsigned char *buf, size_t *nalloc) herr_t ret_value = SUCCEED; FUNC_ENTER_NOAPI(H5T_encode, FAIL); - + /* Find out the size of buffer needed */ if((buf_size=H5O_raw_size(H5O_DTYPE_ID, &f, obj))==0) HGOTO_ERROR(H5E_DATATYPE, H5E_BADSIZE, FAIL, "can't find datatype size"); @@ -2862,7 +2862,7 @@ done: * Function: H5T_decode * * Purpose: Private function for H5Tdecode. Reconstructs a binary - * description of datatype and returns a new object handle. + * description of datatype and returns a new object handle. * * Return: Success: datatype ID(non-negative) * @@ -2946,7 +2946,7 @@ H5T_create(H5T_class_t type, size_t size) if(type==H5T_COMPOUND) dt->shared->u.compnd.packed=TRUE; /* Start out packed */ else if(type==H5T_OPAQUE) - /* Initialize the tag in case it's not set later. A null tag will + /* Initialize the tag in case it's not set later. A null tag will * cause problems for later operations. */ dt->shared->u.opaque.tag = H5MM_strdup(""); break; @@ -3026,7 +3026,7 @@ htri_t H5T_isa(H5G_entry_t *ent, hid_t dxpl_id) { htri_t ret_value; - + FUNC_ENTER_NOAPI(H5T_isa, FAIL); assert(ent); @@ -3061,7 +3061,7 @@ H5T_open (H5G_entry_t *ent, hid_t dxpl_id) H5T_shared_t *shared_fo=NULL; H5T_t *dt=NULL; H5T_t *ret_value; - + FUNC_ENTER_NOAPI(H5T_open, NULL); assert (ent); @@ -3136,7 +3136,7 @@ H5T_open_oid (H5G_entry_t *ent, hid_t dxpl_id) { H5T_t *dt=NULL; H5T_t *ret_value; - + FUNC_ENTER_NOAPI(H5T_open_oid, NULL); assert (ent); @@ -3236,7 +3236,7 @@ H5T_copy(const H5T_t *old_dt, H5T_copy_t method) */ new_dt->shared->state = H5T_STATE_TRANSIENT; break; - + case H5T_COPY_ALL: /* * Return a transient type (locked or unlocked) or an unopened named @@ -3284,7 +3284,7 @@ H5T_copy(const H5T_t *old_dt, H5T_copy_t method) } break; } /* end switch */ - + switch(new_dt->shared->type) { case H5T_COMPOUND: { @@ -3363,7 +3363,7 @@ H5T_copy(const H5T_t *old_dt, H5T_copy_t method) for (i=0; i<new_dt->shared->u.enumer.nmembs; i++) { s = old_dt->shared->u.enumer.name[i]; new_dt->shared->u.enumer.name[i] = H5MM_xstrdup(s); - } + } break; case H5T_VLEN: @@ -3405,7 +3405,7 @@ H5T_copy(const H5T_t *old_dt, H5T_copy_t method) /* Set return value */ ret_value=new_dt; - + done: if(ret_value==NULL) { if(new_dt->shared != NULL) @@ -3541,7 +3541,7 @@ H5T_free(H5T_t *dt) /* Close the parent */ if (dt->shared->parent && H5T_close(dt->shared->parent)<0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, FAIL, "unable to close parent data type"); - + done: FUNC_LEAVE_NOAPI(ret_value); } /* end H5T_free() */ @@ -3584,7 +3584,7 @@ H5T_close(H5T_t *dt) if(dt->shared->state != H5T_STATE_OPEN || dt->shared->fo_count == 1) { - if(H5T_free(dt)<0) + if(H5T_free(dt)<0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "unable to free datatype"); H5FL_FREE(H5T_shared_t, dt->shared); @@ -3689,7 +3689,7 @@ H5T_set_size(H5T_t *dt, size_t size) size_t memb_offset, max_offset=0; size_t max_size; - if((num_membs = H5T_get_nmembers(dt))<0) + if((num_membs = H5T_get_nmembers(dt))<0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to get number of members"); for(i=0; i<(unsigned)num_membs; i++) { @@ -3699,7 +3699,7 @@ H5T_set_size(H5T_t *dt, size_t size) max_index = i; } } - + max_size = H5T_get_member_size(dt, max_index); if(size<(max_offset+max_size)) @@ -3723,12 +3723,12 @@ H5T_set_size(H5T_t *dt, size_t size) dt->shared->type = H5T_VLEN; /* - * Force conversions (i.e. memory to memory conversions + * Force conversions (i.e. memory to memory conversions * should duplicate data, not point to the same VL strings) */ dt->shared->force_conv = TRUE; - /* Before we mess with the info in the union, extract the + /* Before we mess with the info in the union, extract the * values we need */ tmp_cset=dt->shared->u.atomic.u.s.cset; tmp_strpad=dt->shared->u.atomic.u.s.pad; @@ -3781,7 +3781,7 @@ H5T_set_size(H5T_t *dt, size_t size) } } /* end if */ } - + done: FUNC_LEAVE_NOAPI(ret_value); } @@ -4331,7 +4331,7 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name, lt = md = 1; rt = H5T_g.npaths; cmp = -1; - + while (cmp && lt<rt) { md = (lt+rt) / 2; assert(H5T_g.path[md]); @@ -4352,7 +4352,7 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name, * added to the table - QAK, 1/26/02 */ old_npaths=H5T_g.npaths; - + /* * If we didn't find the path or if the caller is specifying a new hard * conversion function then create a new path and add the new function to @@ -4397,7 +4397,7 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name, path->func = func; path->is_hard = TRUE; } - + /* * If the path doesn't have a function by now (because it's a new path * and the caller didn't supply a hard function) then scan the soft list @@ -4439,7 +4439,7 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name, lt = md = 1; rt = H5T_g.npaths; cmp = -1; - + while (cmp && lt<rt) { md = (lt+rt) / 2; assert(H5T_g.path[md]); @@ -4506,7 +4506,7 @@ done: } if (src_id>=0) H5I_dec_ref(src_id); if (dst_id>=0) H5I_dec_ref(dst_id); - + FUNC_LEAVE_NOAPI(ret_value); } @@ -4657,7 +4657,7 @@ H5G_entry_t * H5T_entof (H5T_t *dt) { H5G_entry_t *ret_value = NULL; - + FUNC_ENTER_NOAPI(H5T_entof, NULL); assert (dt); @@ -4681,14 +4681,14 @@ done: /*------------------------------------------------------------------------- * Function: H5T_is_immutable * - * Purpose: Check if a datatype is immutable. + * Purpose: Check if a datatype is immutable. * - * Return: TRUE + * Return: TRUE * - * FALSE + * FALSE * - * Programmer: Raymond Lu - * Friday, Dec 7, 2001 + * Programmer: Raymond Lu + * Friday, Dec 7, 2001 * * Modifications: * @@ -4714,13 +4714,13 @@ done: /*------------------------------------------------------------------------- * Function: H5T_is_named * - * Purpose: Check if a datatype is named. + * Purpose: Check if a datatype is named. * - * Return: TRUE + * Return: TRUE * - * FALSE + * FALSE * - * Programmer: Pedro Vicente + * Programmer: Pedro Vicente * Tuesday, Sep 3, 2002 * * Modifications: @@ -4752,7 +4752,7 @@ done: USAGE H5R_type_t H5Tget_ref_type(dt) H5T_t *dt; IN: datatype pointer for the reference datatype - + RETURNS Success: A reference type defined in H5Rpublic.h Failure: H5R_BADTYPE @@ -4802,7 +4802,7 @@ htri_t H5T_is_sensible(const H5T_t *dt) { htri_t ret_value; - + FUNC_ENTER_NOAPI(H5T_is_sensible, FAIL); assert(dt); @@ -4845,7 +4845,7 @@ done: H5T_t *dt; IN/OUT: Pointer to the datatype to mark H5F_t *f; IN: Pointer to the file the datatype is in H5T_vlen_type_t loc IN: location of type - + RETURNS One of two values on success: TRUE - If the location of any vlen types changed @@ -4889,7 +4889,7 @@ H5T_set_loc(H5T_t *dt, H5F_t *f, H5T_loc_t loc) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "Unable to set VL location"); if(changed>0) ret_value=changed; - + /* Check if the field changed size */ if(old_size != dt->shared->parent->shared->size) { /* Adjust the size of the array */ @@ -4901,7 +4901,7 @@ H5T_set_loc(H5T_t *dt, H5F_t *f, H5T_loc_t loc) case H5T_COMPOUND: /* Check each field and recurse on VL, compound and array type */ /* Sort the fields based on offsets */ H5T_sort_value(dt,NULL); - + for (i=0,accum_change=0; i<dt->shared->u.compnd.nmembs; i++) { H5T_t *memb_type; /* Member's datatype pointer */ @@ -4922,7 +4922,7 @@ H5T_set_loc(H5T_t *dt, H5F_t *f, H5T_loc_t loc) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "Unable to set VL location"); if(changed>0) ret_value=changed; - + /* Check if the field changed size */ if(old_size != memb_type->shared->size) { /* Adjust the size of the member */ @@ -5055,7 +5055,7 @@ H5T_print_stats(H5T_path_t UNUSED * path, int UNUSED * nprint/*in,out*/) #endif FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_print_stats); - + #ifdef H5T_DEBUG if (H5DEBUG(T) && path->stats.ncalls>0) { if (nprint && 0==(*nprint)++) { @@ -5083,8 +5083,8 @@ H5T_print_stats(H5T_path_t UNUSED * path, int UNUSED * nprint/*in,out*/) path->name, path->stats.nelmts, path->stats.ncalls, - path->stats.timer.utime, - path->stats.timer.stime, + path->stats.timer.utime, + path->stats.timer.stime, path->stats.timer.etime, bandwidth); } @@ -5254,7 +5254,7 @@ H5T_debug(const H5T_t *dt, FILE *stream) /* No additional info */ break; } - + } else if (H5T_COMPOUND==dt->shared->type) { /* Compound data type */ for (i=0; i<dt->shared->u.compnd.nmembs; i++) { @@ -5275,7 +5275,7 @@ H5T_debug(const H5T_t *dt, FILE *stream) H5T_debug(dt->shared->u.compnd.memb[i].type, stream); } fprintf(stream, "\n"); - + } else if (H5T_ENUM==dt->shared->type) { /* Enumeration data type */ fprintf(stream, " "); @@ -5289,7 +5289,7 @@ H5T_debug(const H5T_t *dt, FILE *stream) } } fprintf(stream, "\n"); - + } else if (H5T_OPAQUE==dt->shared->type) { fprintf(stream, ", tag=\"%s\"", dt->shared->u.opaque.tag); |