summaryrefslogtreecommitdiffstats
path: root/src/H5T.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2001-08-06 16:01:44 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2001-08-06 16:01:44 (GMT)
commit41529d180ebc129f831d9bfea162e377d598fe92 (patch)
tree8df90e91eecd382f91c7b6e81aff192db208bc31 /src/H5T.c
parent2a39beb49bed12fa0385fbae4c2f118f5809e842 (diff)
downloadhdf5-41529d180ebc129f831d9bfea162e377d598fe92.zip
hdf5-41529d180ebc129f831d9bfea162e377d598fe92.tar.gz
hdf5-41529d180ebc129f831d9bfea162e377d598fe92.tar.bz2
[svn-r4312] Purpose:
Feature shift Description: Take out the v1.2.x compatibility stubs and put in the hooks for v1.4.x compatibility when needed. Platforms tested: FreeBSD 4.3 (hawkwind)
Diffstat (limited to 'src/H5T.c')
-rw-r--r--src/H5T.c168
1 files changed, 0 insertions, 168 deletions
diff --git a/src/H5T.c b/src/H5T.c
index 199b4be..2ac4e83 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -3404,67 +3404,6 @@ H5Tget_member_offset(hid_t type_id, int membno)
FUNC_LEAVE(offset);
}
-#ifdef WANT_H5_V1_2_COMPAT
-
-/*-------------------------------------------------------------------------
- * Function: H5Tget_member_dims
- *
- * Purpose: Returns the dimensionality of the member. The dimensions and
- * permuation vector are returned through arguments DIMS and
- * PERM, both arrays of at least four elements. Either (or even
- * both) may be null pointers.
- *
- * Return: Success: A value between zero and four, inclusive.
- *
- * Failure: Negative
- *
- * Programmer: Robb Matzke
- * Wednesday, January 7, 1998
- *
- * Modifications:
- * Moved into compatibility section for v1.2 functions and patched to
- * use new array datatypes - QAK, 11/13/00
- *
- *-------------------------------------------------------------------------
- */
-int
-H5Tget_member_dims(hid_t type_id, int membno,
- size_t dims[]/*out*/, int perm[]/*out*/)
-{
- H5T_t *dt = NULL;
- intn ndims, i;
-
- FUNC_ENTER(H5Tget_member_dims, FAIL);
- H5TRACE4("Is","iIsxx",type_id,membno,dims,perm);
-
- /* Check args */
- if (H5I_DATATYPE != H5I_get_type(type_id) ||
- NULL == (dt = H5I_object(type_id)) ||
- H5T_COMPOUND != dt->type) {
- HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a compound data type");
- }
- if (membno < 0 || membno >= dt->u.compnd.nmembs) {
- HRETURN_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid member number");
- }
-
- /* Check if this field is an array datatype */
- if(dt->u.compnd.memb[membno].type->type==H5T_ARRAY) {
- /* Value */
- ndims = dt->u.compnd.memb[membno].type->u.array.ndims;
- for (i = 0; i < ndims; i++) {
- if (dims)
- dims[i] = dt->u.compnd.memb[membno].type->u.array.dim[i];
- if (perm)
- perm[i] = dt->u.compnd.memb[membno].type->u.array.perm[i];
- }
- } /* end if */
- else
- ndims=0;
-
- FUNC_LEAVE(ndims);
-}
-#endif /* WANT_H5_V1_2_COMPAT */
-
/*-------------------------------------------------------------------------
* Function: H5Tget_member_class
@@ -3548,35 +3487,12 @@ H5Tget_member_type(hid_t type_id, int membno)
HRETURN_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid member number");
}
-#ifdef WANT_H5_V1_2_COMPAT
- /* HDF5-v1.2.x returns the base type of an array field, not the array
- * field itself. Emulate this difference. - QAK
- */
- if(dt->u.compnd.memb[membno].type->type==H5T_ARRAY) {
- /* Copy parent's data type into an atom */
- if (NULL == (memb_dt = H5T_copy(dt->u.compnd.memb[membno].type->parent,
- H5T_COPY_REOPEN))) {
- HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
- "unable to copy member data type");
- }
- } /* end if */
- else {
- /* Copy data type into an atom */
- if (NULL == (memb_dt = H5T_copy(dt->u.compnd.memb[membno].type,
- H5T_COPY_REOPEN))) {
- HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
- "unable to copy member data type");
- }
- } /* end if */
-
-#else /* WANT_H5_V1_2_COMPAT */
/* Copy data type into an atom */
if (NULL == (memb_dt = H5T_copy(dt->u.compnd.memb[membno].type,
H5T_COPY_REOPEN))) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to copy member data type");
}
-#endif /* WANT_H5_V1_2_COMPAT */
if ((memb_type_id = H5I_register(H5I_DATATYPE, memb_dt)) < 0) {
H5T_close(memb_dt);
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL,
@@ -3646,90 +3562,6 @@ H5Tinsert(hid_t parent_id, const char *name, size_t offset, hid_t member_id)
FUNC_LEAVE(SUCCEED);
}
-#ifdef WANT_H5_V1_2_COMPAT
-
-/*-------------------------------------------------------------------------
- * Function: H5Tinsert_array
- *
- * Purpose: Adds another member to the compound data type PARENT_ID. The
- * new member has a NAME which must be unique within the
- * compound data type. The OFFSET argument defines the start of
- * the member in an instance of the compound data type and
- * MEMBER_ID is the type of the new member. The member is an
- * array with NDIMS dimensionality and the size of the array is
- * DIMS. The total member size should be relatively small.
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Robb Matzke
- * Tuesday, July 7, 1998
- *
- * Modifications:
- * Moved into compatibility section for v1.2 functions and patched to
- * use new array datatypes - QAK, 11/13/00
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5Tinsert_array(hid_t parent_id, const char *name, size_t offset,
- int ndims, const size_t dim[/*ndims*/], const int *perm,
- hid_t member_id)
-{
- H5T_t *parent = NULL; /*the compound parent data type */
- 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;
-
- FUNC_ENTER(H5Tinsert_array, FAIL);
- H5TRACE7("e","iszIs*[a3]z*Isi",parent_id,name,offset,ndims,dim,perm,
- member_id);
-
- /* Check args */
- if (H5I_DATATYPE != H5I_get_type(parent_id) ||
- NULL == (parent = H5I_object(parent_id)) ||
- H5T_COMPOUND != parent->type) {
- HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a compound data type");
- }
- if (H5T_STATE_TRANSIENT!=parent->state) {
- HRETURN_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "parent type read-only");
- }
- if (!name || !*name) {
- HRETURN_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no member name");
- }
- if (ndims<0 || ndims>4) {
- HRETURN_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid dimensionality");
- }
- if (ndims>0 && !dim) {
- HRETURN_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no dimensions specified");
- }
- for (i=0; i<ndims; i++) {
- if (dim[i]<1) {
- HRETURN_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid dimension");
- }
- newdim[i]=dim[i];
- }
- if (H5I_DATATYPE != H5I_get_type(member_id) ||
- NULL == (member = H5I_object(member_id))) {
- HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type");
- }
-
- /* Create temporary array datatype for inserting field */
- if ((array=H5T_array_create(member,ndims,newdim,perm))==NULL)
- HRETURN_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to create array datatype");
-
- /* Insert */
- if (H5T_insert(parent, name, offset, array) < 0)
- HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINSERT, FAIL, "unable to insert member");
-
- /* Close array datatype */
- if (H5T_close(array) < 0)
- HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINSERT, FAIL, "unable to close array type");
-
- FUNC_LEAVE(SUCCEED);
-}
-#endif /* WANT_H5_V1_2_COMPAT */
-
/*-------------------------------------------------------------------------
* Function: H5Tpack