diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2001-08-06 16:01:44 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2001-08-06 16:01:44 (GMT) |
commit | 41529d180ebc129f831d9bfea162e377d598fe92 (patch) | |
tree | 8df90e91eecd382f91c7b6e81aff192db208bc31 /tools | |
parent | 2a39beb49bed12fa0385fbae4c2f118f5809e842 (diff) | |
download | hdf5-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 'tools')
-rw-r--r-- | tools/h5dump/h5dump.c | 67 | ||||
-rw-r--r-- | tools/h5toh4/h5toh4.c | 44 | ||||
-rw-r--r-- | tools/lib/h5tools.c | 22 | ||||
-rw-r--r-- | tools/lib/h5tools_str.c | 22 |
4 files changed, 0 insertions, 155 deletions
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c index 4a99794..004a5b8 100644 --- a/tools/h5dump/h5dump.c +++ b/tools/h5dump/h5dump.c @@ -876,29 +876,6 @@ print_datatype(hid_t type) for (i = 0; i < nmembers; i++) { fname = H5Tget_member_name(type, i); mtype = H5Tget_member_type(type, i); -#ifdef WANT_H5_V1_2_COMPAT - /* v1.2 returns the base type of an array field, work around this */ - { - hid_t new_mtype; /* datatype for array, if necessary */ - int arrndims; /* Array rank for reading */ - size_t dims[H5S_MAX_RANK]; /* Array dimensions for reading */ - hsize_t arrdims[H5S_MAX_RANK]; /* Array dimensions for reading */ - int k; /* Local index variable */ - - /* Get the array dimensions */ - arrndims=H5Tget_member_dims(type,i,dims,NULL); - - /* Patch up array information */ - if(arrndims>0) { - for(k=0; k<arrndims; k++) - arrdims[k]=dims[k]; - new_mtype=H5Tarray_create(mtype,arrndims,arrdims,NULL); - H5Tclose(mtype); - mtype=new_mtype; - } /* end if */ - } -#endif /* WANT_H5_V1_2_COMPAT */ - indentation(indent + COL); if (H5Tget_class(mtype) == H5T_COMPOUND) @@ -3662,28 +3639,6 @@ xml_print_datatype(hid_t type) fname = H5Tget_member_name(type, i); mtype = H5Tget_member_type(type, i); -#ifdef WANT_H5_V1_2_COMPAT - /* v1.2 returns the base type of an array field, work around this */ - { - hid_t new_mtype; /* datatype for array, if necessary */ - int arrndims; /* Array rank for reading */ - size_t dims[H5S_MAX_RANK]; /* Array dimensions for reading */ - hsize_t arrdims[H5S_MAX_RANK]; /* Array dimensions for reading */ - int k; /* Local index variable */ - - /* Get the array dimensions */ - arrndims=H5Tget_member_dims(type,i,dims,NULL); - - /* Patch up array information */ - if(arrndims>0) { - for(k=0; k<arrndims; k++) - arrdims[k]=dims[k]; - new_mtype=H5Tarray_create(mtype,arrndims,arrdims,NULL); - H5Tclose(mtype); - mtype=new_mtype; - } /* end if */ - } -#endif /* WANT_H5_V1_2_COMPAT */ indentation(indent); t_fname = xml_escape_the_name(fname); printf("<Field FieldName=\"%s\">\n", t_fname); @@ -4241,28 +4196,6 @@ xml_dump_named_datatype(hid_t type, const char *name) fname = H5Tget_member_name(type, x); mtype = H5Tget_member_type(type, x); -#ifdef WANT_H5_V1_2_COMPAT - /* v1.2 returns the base type of an array field, work around this */ - { - hid_t new_mtype; /* datatype for array, if necessary */ - int arrndims; /* Array rank for reading */ - size_t dims[H5S_MAX_RANK]; /* Array dimensions for reading */ - hsize_t arrdims[H5S_MAX_RANK]; /* Array dimensions for reading */ - int k; /* Local index variable */ - - /* Get the array dimensions */ - arrndims=H5Tget_member_dims(type,x,dims,NULL); - - /* Patch up array information */ - if(arrndims>0) { - for(k=0; k<arrndims; k++) - arrdims[k]=dims[k]; - new_mtype=H5Tarray_create(mtype,arrndims,arrdims,NULL); - H5Tclose(mtype); - mtype=new_mtype; - } /* end if */ - } -#endif /* WANT_H5_V1_2_COMPAT */ indentation(indent); t_fname = xml_escape_the_name(fname); printf("<Field FieldName=\"%s\">\n", t_fname); diff --git a/tools/h5toh4/h5toh4.c b/tools/h5toh4/h5toh4.c index 09138b0..853bfd8 100644 --- a/tools/h5toh4/h5toh4.c +++ b/tools/h5toh4/h5toh4.c @@ -788,28 +788,6 @@ int32 order_array[512]; DEBUG_PRINT("Error detected in %s() [%s line %d]\n", "convert_dataset", __FILE__, __LINE__); break; } -#ifdef H5_WANT_H5_V1_2_COMPAT - /* v1.2 returns the base type of an array field, work around this */ - { - hid_t new_fieldtype; /* datatype for array, if necessary */ - int arrndims; /* Array rank for reading */ - size_t dims[H5S_MAX_RANK]; /* Array dimensions for reading */ - hsize_t arrdims[H5S_MAX_RANK]; /* Array dimensions for reading */ - int k; /* Local index variable */ - - /* Get the array dimensions */ - arrndims=H5Tget_member_dims(type,idx,dims,NULL); - - /* Patch up array information */ - if(arrndims>0) { - for(k=0; k<arrndims; k++) - arrdims[k]=dims[k]; - new_fieldtype=H5Tarray_create(fieldtype,arrndims,arrdims,NULL); - H5Tclose(fieldtype); - fieldtype=new_fieldtype; - } /* end if */ - } -#endif /* WANT_H5_V1_2_COMPAT */ /* Special case for array fields */ if(H5Tget_class(fieldtype)==H5T_ARRAY) { hid_t arr_base_type; @@ -932,28 +910,6 @@ int32 order_array[512]; DEBUG_PRINT("Error detected in %s() [%s line %d]\n", "convert_dataset", __FILE__, __LINE__); break; } -#ifdef H5_WANT_H5_V1_2_COMPAT - /* v1.2 returns the base type of an array field, work around this */ - { - hid_t new_arr_type; /* datatype for array, if necessary */ - int arrndims; /* Array rank for reading */ - size_t dims[H5S_MAX_RANK]; /* Array dimensions for reading */ - hsize_t arrdims[H5S_MAX_RANK]; /* Array dimensions for reading */ - int k; /* Local index variable */ - - /* Get the array dimensions */ - arrndims=H5Tget_member_dims(type,idx,dims,NULL); - - /* Patch up array information */ - if(arrndims>0) { - for(k=0; k<arrndims; k++) - arrdims[k]=dims[k]; - new_arr_type=H5Tarray_create(arr_type,arrndims,arrdims,NULL); - H5Tclose(arr_type); - arr_type=new_arr_type; - } /* end if */ - } -#endif /* WANT_H5_V1_2_COMPAT */ /* Get the number of dimensions */ if ((ndimf = H5Tget_array_ndims(arr_type)) < 0 || ndimf > H5S_MAX_RANK ) { fprintf(stderr, "Error: rank of members of compound type should not be %d\n",ndimf); diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c index 42cc70c..a34c5b3 100644 --- a/tools/lib/h5tools.c +++ b/tools/lib/h5tools.c @@ -1091,28 +1091,6 @@ h5tools_fixtype(hid_t f_type) for (i = 0, size = 0; i < nmembs; i++) { /* Get the member type and fix it */ f_memb = H5Tget_member_type(f_type, i); -#ifdef WANT_H5_V1_2_COMPAT - /* v1.2 returns the base type of an array field, work around this */ - { - hid_t new_f_memb; /* datatype for array, if necessary */ - int arrndims; /* Array rank for reading */ - size_t dims[H5S_MAX_RANK]; /* Array dimensions for reading */ - hsize_t arrdims[H5S_MAX_RANK]; /* Array dimensions for reading */ - int j; /* Local index variable */ - - /* Get the array dimensions */ - arrndims=H5Tget_member_dims(f_type,i,dims,NULL); - - /* Patch up array information */ - if(arrndims>0) { - for(j=0; j<arrndims; j++) - arrdims[j]=dims[j]; - new_f_memb=H5Tarray_create(f_memb,arrndims,arrdims,NULL); - H5Tclose(f_memb); - f_memb=new_f_memb; - } /* end if */ - } -#endif /* WANT_H5_V1_2_COMPAT */ memb[i] = h5tools_fixtype(f_memb); H5Tclose(f_memb); diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index 0836537..e594ebd 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -682,28 +682,6 @@ h5tools_str_sprint(h5tools_str_t *str, const h5dump_t *info, hid_t container, /* The value */ offset = H5Tget_member_offset(type, j); memb = H5Tget_member_type(type, j); -#ifdef WANT_H5_V1_2_COMPAT - /* v1.2 returns the base type of an array field, work around this */ - { - hid_t new_memb; /* datatype for array, if necessary */ - int arrndims; /* Array rank for reading */ - size_t dims[H5S_MAX_RANK]; /* Array dimensions for reading */ - hsize_t arrdims[H5S_MAX_RANK]; /* Array dimensions for reading */ - int k; /* Local index variable */ - - /* Get the array dimensions */ - arrndims=H5Tget_member_dims(type,j,dims,NULL); - - /* Patch up array information */ - if(arrndims>0) { - for(k=0; k<arrndims; k++) - arrdims[k]=dims[k]; - new_memb=H5Tarray_create(memb,arrndims,arrdims,NULL); - H5Tclose(memb); - memb=new_memb; - } /* end if */ - } -#endif /* WANT_H5_V1_2_COMPAT */ ctx->indent_level++; h5tools_str_sprint(str, info, container, memb, cp_vp + offset , ctx); |