summaryrefslogtreecommitdiffstats
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
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)
-rw-r--r--acconfig.h4
-rwxr-xr-xconfigure18
-rw-r--r--configure.in14
-rw-r--r--fortran/src/H5Tf.c185
-rw-r--r--release_docs/INSTALL_Windows.txt64
-rw-r--r--src/H5Dpublic.h9
-rw-r--r--src/H5FDmulti.c4
-rw-r--r--src/H5Fpublic.h17
-rw-r--r--src/H5P.c805
-rw-r--r--src/H5Ppublic.h24
-rw-r--r--src/H5T.c168
-rw-r--r--src/H5Tpublic.h9
-rw-r--r--src/H5config.h.in4
-rw-r--r--test/big.c8
-rw-r--r--test/h5test.c98
-rw-r--r--test/istore.c4
-rw-r--r--test/tarray.c104
-rw-r--r--tools/h5dump/h5dump.c67
-rw-r--r--tools/h5toh4/h5toh4.c44
-rw-r--r--tools/lib/h5tools.c22
-rw-r--r--tools/lib/h5tools_str.c22
21 files changed, 27 insertions, 1667 deletions
diff --git a/acconfig.h b/acconfig.h
index 7a1ae84..0141235 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -13,8 +13,8 @@
/* Define if it's safe to use `long long' for hsize_t and hssize_t */
#undef HAVE_LARGE_HSIZET
-/* Define if the HDF5 v1.2 compatibility functions are to be compiled in */
-#undef WANT_H5_V1_2_COMPAT
+/* Define if the HDF5 v1.4 compatibility functions are to be compiled in */
+#undef WANT_H5_V1_4_COMPAT
/* Width for printf() for type `long long' or `__int64', us. `ll' */
#undef PRINTF_LL_WIDTH
diff --git a/configure b/configure
index c9d8842..58ff77f 100755
--- a/configure
+++ b/configure
@@ -155,7 +155,7 @@ ac_help="$ac_help
ac_help="$ac_help
--enable-threadsafe Enable thread safe capability"
ac_help="$ac_help
- --enable-hdf5v1_2 Compile the HDF5 v1.2 compatibility interface [default=no]"
+ --enable-hdf5v1_4 Compile the HDF5 v1.4 compatibility interface [default=no]"
ac_help="$ac_help
--enable-stream-vfd Build the Stream Virtual File Driver. [default=no]"
ac_help="$ac_help
@@ -8418,19 +8418,19 @@ EOF
fi
-echo $ac_n "checking whether HDF5 v1.2 compatibility functions enabled""... $ac_c" 1>&6
-echo "configure:8423: checking whether HDF5 v1.2 compatibility functions enabled" >&5
-# Check whether --enable-hdf5v1_2 or --disable-hdf5v1_2 was given.
-if test "${enable_hdf5v1_2+set}" = set; then
- enableval="$enable_hdf5v1_2"
- HDF5_V1_2_COMPAT=$enableval
+echo $ac_n "checking whether HDF5 v1.4 compatibility functions enabled""... $ac_c" 1>&6
+echo "configure:8423: checking whether HDF5 v1.4 compatibility functions enabled" >&5
+# Check whether --enable-hdf5v1_4 or --disable-hdf5v1_4 was given.
+if test "${enable_hdf5v1_4+set}" = set; then
+ enableval="$enable_hdf5v1_4"
+ HDF5_V1_4_COMPAT=$enableval
fi
-if test "X$HDF5_V1_2_COMPAT" = "Xyes"; then
+if test "X$HDF5_V1_4_COMPAT" = "Xyes"; then
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
-#define WANT_H5_V1_2_COMPAT 1
+#define WANT_H5_V1_4_COMPAT 1
EOF
else
diff --git a/configure.in b/configure.in
index 984b099..7c6dd05 100644
--- a/configure.in
+++ b/configure.in
@@ -988,17 +988,17 @@ if test "X$THREADSAFE" = "Xyes"; then
fi
dnl ----------------------------------------------------------------------
-dnl Check if they would like the HDF5 v1.2 compatibility functions
+dnl Check if they would like the HDF5 v1.4 compatibility functions
dnl compiled in
dnl
-AC_MSG_CHECKING(whether HDF5 v1.2 compatibility functions enabled)
-AC_ARG_ENABLE(hdf5v1_2,
- [ --enable-hdf5v1_2 Compile the HDF5 v1.2 compatibility interface [default=no]],
- HDF5_V1_2_COMPAT=$enableval)
+AC_MSG_CHECKING(whether HDF5 v1.4 compatibility functions enabled)
+AC_ARG_ENABLE(hdf5v1_4,
+ [ --enable-hdf5v1_4 Compile the HDF5 v1.4 compatibility interface [default=no]],
+ HDF5_V1_4_COMPAT=$enableval)
-if test "X$HDF5_V1_2_COMPAT" = "Xyes"; then
+if test "X$HDF5_V1_4_COMPAT" = "Xyes"; then
AC_MSG_RESULT(yes)
- AC_DEFINE(WANT_H5_V1_2_COMPAT)
+ AC_DEFINE(WANT_H5_V1_4_COMPAT)
else
AC_MSG_RESULT(no)
fi
diff --git a/fortran/src/H5Tf.c b/fortran/src/H5Tf.c
index 06ca00b..67c8d9c 100644
--- a/fortran/src/H5Tf.c
+++ b/fortran/src/H5Tf.c
@@ -1020,62 +1020,6 @@ nh5tget_member_offset_c ( hid_t_f *type_id ,int_f* member_no, size_t_f * offset)
}
/*----------------------------------------------------------------------------
- * Name: h5tget_member_dims_c
- * Purpose: Call H5Tget_member_dims to get number
- * of dimensions of the field
- * Inputs: type_id - identifier of the dataspace
- * field_idx - Field index (0-based) of the field
- * dims to retrieve
- * Outputs: dims - number of dimensions of the field
- * field_dims - buffer to store the dimensions of the field
- * perm - buffer to store the permutation vector of the field
- * Returns: 0 on success, -1 on failure
- * Programmer: XIANGYANG SU
- * Thursday, February 3, 2000
- * Modifications: WANT_H5_V1_2_COMPAT added for backward compatibility
- * November 16, 2000 EP
- *---------------------------------------------------------------------------*/
-
-int_f
-nh5tget_member_dims_c ( hid_t_f *type_id ,int_f* field_idx, int_f * dims, size_t_f * field_dims, int_f * perm )
-{
- int ret_value = -1;
- hid_t c_type_id;
- int c_dims, i;
- int* c_perm;
- size_t * c_field_dims;
- int c_field_idx;
-
-#ifdef WANT_H5_V1_2_COMPAT
-
- c_field_dims = (size_t*)malloc(sizeof(size_t)*4);
- if(!c_field_dims) return ret_value;
-
- c_perm = (int*)malloc(sizeof(int)*4);
- if(!c_perm) return ret_value;
-
- c_type_id = *type_id;
- c_field_idx = *field_idx;
- c_dims = H5Tget_member_dims(c_type_id, c_field_idx, c_field_dims, c_perm);
- if (c_dims < 0) return ret_value;
-
- *dims = (int_f)c_dims;
- for(i =0; i < c_dims; i++)
- {
- field_dims[c_dims-i-1] = (size_t_f)c_field_dims[i];
- perm[c_dims-i-1] = (int_f)c_perm[i];
- }
-
- ret_value = 0;
- HDfree(c_field_dims);
- HDfree(c_perm);
-
-#endif /* WANT_H5_V1_2_COMPAT */
-
- return ret_value;
-}
-
-/*----------------------------------------------------------------------------
* Name: h5tget_array_dims_c
* Purpose: Call H5Tget_array_dims to get
* dimensions of array datatype
@@ -1301,135 +1245,6 @@ nh5tpack_c(hid_t_f * type_id)
return ret_value;
}
-/*----------------------------------------------------------------------------
- * Name: h5tinsert_array_c
- * Purpose: Call H5Tinsert_array to add a new member to the
- * compound datatype parent_id.
- * Inputs: parent_id - identifier of the parent compound datatype
- * name - name of the new member
- * namelen - length of the name
- * offset - Offset to start of new member within compound datatype
- * ndims - Dimensionality of new member. Valid values
- * are 0 (zero) through 4 (four).
- * dims - Size of new member array
- * member_id - identifier of the datatype of the new member
- * perm - Pointer to buffer to store the permutation
- * vector of the field
- * Returns: 0 on success, -1 on failure
- * Programmer: XIANGYANG SU
- * Thursday, February 3, 2000
- * Modifications: WANT_H5_V1_2_COMPAT added for backward compatibility
- * November 16, 2000 EP
- *---------------------------------------------------------------------------*/
-int_f
-nh5tinsert_array_c(hid_t_f * parent_id, _fcd name, int_f* namelen, size_t_f* offset, int_f* ndims, size_t_f* dims, hid_t_f* member_id, int_f* perm )
-{
- int ret_value = -1;
- hid_t c_parent_id;
- hid_t c_member_id;
- int c_ndims;
- herr_t status;
- size_t c_offset;
- size_t * c_dims;
- char* c_name;
- int c_namelen;
- int * c_perm, i;
-
-#ifdef WANT_H5_V1_2_COMPAT
- c_offset = *offset;
- c_dims = (size_t*)malloc(sizeof(size_t)*(*ndims));
- if(!c_dims) return ret_value;
-
- c_perm = (int*)malloc(sizeof(int)*(*ndims));
- if(!c_perm) return ret_value;
-
- /*
- * Transpose dimension arrays because of C-FORTRAN storage order
- */
- for (i = 0; i < *ndims ; i++) {
- c_dims[i] = (size_t)dims[*ndims - i - 1];
- c_perm[i] = (int)perm[*ndims - i - 1];
- }
- c_namelen = *namelen;
- c_name = (char *)HD5f2cstring(name, c_namelen);
- if (c_name == NULL) return ret_value;
-
- c_parent_id = *parent_id;
- c_member_id = *member_id;
- c_ndims = *ndims;
- status = H5Tinsert_array(c_parent_id, c_name, c_offset,c_ndims, c_dims, c_perm, c_member_id);
-
- if(status < 0) return ret_value;
- ret_value = 0;
-
-#endif /* WANT_H5_V1_2_COMPAT */
- return ret_value;
-
-}
-
-
-/*----------------------------------------------------------------------------
- * Name: h5tinsert_array_c2
- * Purpose: Call H5Tinsert_array to add a new member to the
- * compound datatype parent_id.
- * the difference between this function and h5tinsert_array_c
- * is that this one doesn't take perm array as input
- * Inputs: parent_id - identifier of the parent compound datatype
- * name - name of the new member
- * namelen - length of the name
- * offset - Offset to start of new member within compound datatype
- * ndims - Dimensionality of new member. Valid values
- * are 0 (zero) through 4 (four).
- * dims - Size of new member array
- * member_id - identifier of the datatype of the new member
- * Returns: 0 on success, -1 on failure
- * Programmer: XIANGYANG SU
- * Thursday, February 3, 2000
- * Modifications: WANT_H5_V1_2_COMPAT added for backward compatibility
- * November 16, 2000 EP
- *---------------------------------------------------------------------------*/
-int_f
-nh5tinsert_array_c2(hid_t_f * parent_id, _fcd name, int_f* namelen, size_t_f* offset, int_f* ndims, size_t_f* dims, hid_t_f* member_id )
-{
- int ret_value = -1;
- hid_t c_parent_id;
- hid_t c_member_id;
- int c_ndims;
- herr_t status;
- size_t c_offset;
- size_t * c_dims;
- char* c_name;
- int c_namelen;
- int i;
-
-#ifdef WANT_H5_V1_2_COMPAT
-
- c_offset = *offset;
- c_dims = (size_t*)malloc(sizeof(size_t)*(*ndims));
- if(!c_dims) return ret_value;
-
- /*
- * Transpose dimension arrays because of C-FORTRAN storage order
- */
- for (i = 0; i < *ndims ; i++) {
- c_dims[i] = (size_t)dims[*ndims - i - 1];
- }
- c_namelen = *namelen;
- c_name = (char *)HD5f2cstring(name, c_namelen);
- if (c_name == NULL) return ret_value;
-
- c_parent_id = *parent_id;
- c_member_id = *member_id;
- c_ndims = *ndims;
- status = H5Tinsert_array(c_parent_id, c_name, c_offset, c_ndims, c_dims, NULL, c_member_id);
-
- if(status < 0) return ret_value;
- ret_value = 0;
-
-#endif /* WANT_H5_V1_2_COMPAT */
-
- return ret_value;
-
}
/*----------------------------------------------------------------------------
* Name: h5tarray_create_c
diff --git a/release_docs/INSTALL_Windows.txt b/release_docs/INSTALL_Windows.txt
index 46e85e8..49d0ab3 100644
--- a/release_docs/INSTALL_Windows.txt
+++ b/release_docs/INSTALL_Windows.txt
@@ -107,32 +107,7 @@ STEP 1: Building hdf5 libraries and non-hdf4 related tools
Then open the c:\myHDFstuff\hdf5\proj\all\all.dsw
workspace.
- 3. If you don't want to build and test backward
- compatibility with hdf5 1.2, you may skip this part and
- go to part 4.
-
- To build and test backward compatibility with hdf5 1.2,
- a) go to "Project" and select "Settings"
- b) A window called "Project Settings" should be
- popped up,on the upper-left corner is a small box
- "Settings For". Set the option to
- "Win32 Release".
- c) Go to the the right side of "Project Settings"
- window,choose C/C++ on the menu.
- d) Go to the "Category" box below menu bar, choose
- Preprocessor.
- e) Go to "Preprocessor definitions" box below
- "Category". Inside the box, type
- "WANT_H5_V1_2_COMPAT". Note: don't type double
- quote for "WANT_H5_V1_2_COMPAT" and add a comma
- between "WANT_H5_V1_2_COMPAT" and the last
- preprocessor definations(WIN32).
- f) click OK at the bottom of "Project Settings"
- window.
- g) repeat a)-f) and choose the option as
- "win32 Debug" on step b).
-
- 4. Select "Build", then Select "Set Active Configuration".
+ 3. Select "Build", then Select "Set Active Configuration".
On Windows platform select as the active configuration
@@ -506,36 +481,11 @@ Step 1.
Then open the c:\myHDFstuff\hdf5\proj\all\all.dsw
workspace.
- 3. If you don't want to build and test backward
- compatibility with hdf5 1.2, you may skip this part and
- go to part 4.
-
- To build and test backward compatibility with hdf5 1.2,
- a) go to "Project" and select "Settings"
- b) A window called "Project Settings" should be
- popped up,on the upper-left corner is a small box
- "Settings For" Choose the option to
- "Win32 Release".
- c) Go to the the right side of "Project Settings"
- window, choose C/C++ on the menu.
- d) Go to the "Category" box below menu bar, choose
- Preprocessor.
- e) Go to "Preprocessor definitions" box below
- "Category". Inside the box, type
- "WANT_H5_V1_2_COMPAT". Note: don't type
- double quote for "WANT_H5_V1_2_COMPAT" and add a
- comma between "WANT_H5_V1_2_COMPAT" and the last
- preprocessor defination(WIN32).
- f) click OK at the bottom of "Project Settings"
- window.
- g) repeat a)-f) and set the option to "win32 Debug"
- on step b).
-
- 4. This part is for users who are familar with handling
+ 3. This part is for users who are familar with handling
settings of VC++ project and store their hdf4 libraries
not under C:\hdf41r4. Other users can skip this part.
- 4.1 Change the path where hdf4 library header files are
+ 3.1 Change the path where hdf4 library header files are
located
a) On the View menu, click Workspace, you may see a
@@ -580,8 +530,8 @@ Step 1.
or vice versa.
d) repeat step c) for the other three projects.
- 4.2 Replace the user's hdf and mfhdf libraries, export
- libraries of hdf and mfhdf DLLs
+ 3.2 Replace the user's hdf and mfhdf libraries, export
+ libraries of hdf and mfhdf DLLs
You also need to modify four projects: h4toh5,
h4toh5dll, h5toh4 and h5toh4dll:
@@ -616,9 +566,9 @@ Step 1.
on the pop-up box, to insert your own hd414m.lib,
hd414md.lib,hm414m.lib and hd414m.lib. You must know
their paths at first.
- i) repeat a)-h) for h5toh4 and h5toh4dll.
+ i) repeat a)-h) for h5toh4 and h5toh4dll.
- 5. Select "Build", then Select "Set Active Configuration".
+ 4. Select "Build", then Select "Set Active Configuration".
On Windows platform select as the active configuration
diff --git a/src/H5Dpublic.h b/src/H5Dpublic.h
index a4d8b74..056fb43 100644
--- a/src/H5Dpublic.h
+++ b/src/H5Dpublic.h
@@ -31,15 +31,6 @@ typedef enum H5D_layout_t {
H5D_NLAYOUTS = 3 /*this one must be last! */
} H5D_layout_t;
-#if defined(WANT_H5_V1_2_COMPAT) || defined(H5_WANT_H5_V1_2_COMPAT)
-/* Values for the data transfer property */
-typedef enum H5D_transfer_t {
- H5D_XFER_INDEPENDENT, /*Independent data transfer */
- H5D_XFER_COLLECTIVE, /*Collective data transfer */
- H5D_XFER_DFLT /*default data transfer mode */
-} H5D_transfer_t;
-#endif /* WANT_H5_V1_2_COMPAT */
-
/* Define the operator function pointer for H5Diterate() */
typedef herr_t (*H5D_operator_t)(void *elem, hid_t type_id, hsize_t ndim,
hssize_t *point, void *operator_data);
diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c
index bd42869..f0ef846 100644
--- a/src/H5FDmulti.c
+++ b/src/H5FDmulti.c
@@ -470,10 +470,8 @@ H5Pget_fapl_multi(hid_t fapl_id, H5FD_mem_t *memb_map/*out*/,
if (H5P_FILE_ACCESS!=H5Pget_class(fapl_id))
H5Epush_ret(func, H5E_PLIST, H5E_BADTYPE, "not a file access property list", -1);
-#ifndef WANT_H5_V1_2_COMPAT
if (H5FD_MULTI!=H5Pget_driver(fapl_id))
H5Epush_ret(func, H5E_PLIST, H5E_BADVALUE, "incorrect VFL driver", -1);
-#endif /* WANT_H5_V1_2_COMPAT */
if (NULL==(fa=H5Pget_driver_info(fapl_id)))
H5Epush_ret(func, H5E_PLIST, H5E_BADVALUE, "bad VFL driver info", -1);
@@ -589,10 +587,8 @@ H5Pget_dxpl_multi(hid_t dxpl_id, hid_t *memb_dxpl/*out*/)
if (H5P_FILE_ACCESS!=H5Pget_class(dxpl_id))
H5Epush_ret(func, H5E_PLIST, H5E_BADTYPE, "not a file access property list", -1);
-#ifndef WANT_H5_V1_2_COMPAT
if (H5FD_MULTI!=H5Pget_driver(dxpl_id))
H5Epush_ret(func, H5E_PLIST, H5E_BADVALUE, "incorrect VFL driver", -1);
-#endif /* WANT_H5_V1_2_COMPAT */
if (NULL==(dx=H5Pget_driver_info(dxpl_id)))
H5Epush_ret(func, H5E_PLIST, H5E_BADVALUE, "bad VFL driver info", -1);
diff --git a/src/H5Fpublic.h b/src/H5Fpublic.h
index 3c03084..5309b02 100644
--- a/src/H5Fpublic.h
+++ b/src/H5Fpublic.h
@@ -47,23 +47,6 @@
#define H5F_MPIO_DEBUG_KEY "H5F_mpio_debug_key"
#endif
-#if defined(WANT_H5_V1_2_COMPAT) || defined(H5_WANT_H5_V1_2_COMPAT)
-/*
- * Low-level file drivers. These values are returned by H5Pget_file_driver()
- * and are set by the various H5Pset_...() functions that set file driver
- * properties.
- */
-typedef enum H5F_driver_t {
- H5F_LOW_ERROR = -1, /*error return value */
- H5F_LOW_STDIO = 0, /*use functions declared in stdio.h */
- H5F_LOW_SEC2 = 1, /*use functions declared in unistd.h */
- H5F_LOW_MPIO = 2, /*use indep or collective MPI-IO */
- H5F_LOW_CORE = 3, /*use malloc() and free() */
- H5F_LOW_SPLIT = 4, /*separate meta data from raw data */
- H5F_LOW_FAMILY = 5 /*split addr space over many files */
-} H5F_driver_t;
-#endif /* WANT_H5_V1_2_COMPAT */
-
/* The difference between a single file and a set of mounted files */
typedef enum H5F_scope_t {
H5F_SCOPE_LOCAL = 0, /*specified file handle only */
diff --git a/src/H5P.c b/src/H5P.c
index d8b0229..7aa71bb 100644
--- a/src/H5P.c
+++ b/src/H5P.c
@@ -27,20 +27,6 @@
/* Default file driver - see H5Pget_driver() */
#include "H5FDsec2.h" /* Posix unbuffered I/O file driver */
-#ifdef WANT_H5_V1_2_COMPAT
-/* Other predefined file drivers */
-#include "H5FDcore.h" /* Files stored entirely in memory */
-#include "H5FDfamily.h" /* File families */
-#include "H5FDmpio.h" /* Parallel files using MPI-2 I/O */
-#include "H5FDstdio.h" /* Standard C buffered I/O */
-#include "H5FDsrb.h" /* Remote access using SRB */
-#include "H5FDgass.h" /* Remote files using GASS I/O */
-#include "H5FDdpss.h" /* Remote access using Storage Client API */
-#include "H5FDstream.h" /* in-memory files streamed via sockets */
-#include "H5FDmulti.h" /* Usage-partitioned file family */
-#include "H5FDlog.h" /* sec2 driver with I/O logging (for debugging) */
-#endif /* WANT_H5_V1_2_COMPAT */
-
#define PABLO_MASK H5P_mask
/* Is the interface initialized? */
@@ -1717,97 +1703,6 @@ H5Pset_driver(hid_t plist_id, hid_t driver_id, const void *driver_info)
FUNC_LEAVE(SUCCEED);
}
-#ifdef WANT_H5_V1_2_COMPAT
-
-/*-------------------------------------------------------------------------
- * Function: H5Pget_driver
- *
- * Purpose: Return the ID of the low-level file driver. PLIST_ID should
- * be a file access property list.
- *
- * Return: Success: A low-level driver ID
- *
- * Failure: H5F_LOW_ERROR (a negative value)
- *
- * Programmer: Robb Matzke
- * Thursday, February 26, 1998
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-H5F_driver_t
-H5Pget_driver(hid_t plist_id)
-{
- H5F_access_t *plist = NULL;
- H5F_driver_t ret_value=H5F_LOW_ERROR;
-
- FUNC_ENTER (H5Pget_driver, H5F_LOW_ERROR);
- H5TRACE1("Fd","i",plist_id);
-
- /* Check arguments */
- if (H5P_FILE_ACCESS != H5P_get_class (plist_id) ||
- NULL == (plist=H5I_object (plist_id))) {
- HRETURN_ERROR (H5E_ARGS, H5E_BADTYPE, H5F_LOW_ERROR,
- "not a file access property list");
- }
-
- if(plist->driver_id==H5FD_SEC2 || plist->driver_id==H5P_DEFAULT)
- ret_value=H5F_LOW_SEC2;
- else if(plist->driver_id==H5FD_STDIO)
- ret_value=H5F_LOW_STDIO;
- else if(plist->driver_id==H5FD_MPIO)
- ret_value=H5F_LOW_MPIO;
- else if(plist->driver_id==H5FD_CORE)
- ret_value=H5F_LOW_CORE;
- else if(plist->driver_id==H5FD_FAMILY)
- ret_value=H5F_LOW_FAMILY;
- else if(plist->driver_id==H5FD_MULTI) { /* Need to check if it's a split or multi file */
- H5FD_mem_t mt;
- H5FD_mem_t memb_map[H5FD_MEM_NTYPES];
- haddr_t memb_addr[H5FD_MEM_NTYPES];
- uintn multi=0;
-
- /* Get the information from the multi file driver */
- if (H5Pget_fapl_multi(plist_id,memb_map,NULL,NULL,memb_addr,NULL)<0) {
- HRETURN_ERROR (H5E_PLIST, H5E_NOTFOUND, H5F_LOW_ERROR,
- "can't get multi file information");
- }
-
- /* Check whether all of the meta data is in one file & the raw data in another */
- for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt++) {
- if(mt==H5FD_MEM_DRAW) {
- if(memb_map[mt]!=H5FD_MEM_DRAW) {
- multi=1;
- break;
- } /* end if */
- } /* end if */
- else {
- if(memb_map[mt]!=H5FD_MEM_SUPER) {
- multi=1;
- break;
- } /* end if */
- } /* end else */
- } /* end for */
-
- /* Check further if things look like a split file currently */
- if(!multi) {
- if(memb_addr[H5FD_MEM_SUPER]!=0 || memb_addr[H5FD_MEM_DRAW] != HADDR_MAX/2)
- multi=1;
- } /* end if */
-
- if(multi)
- ret_value=H5F_LOW_ERROR; /* v1.2 didn't have multi-file driver */
- else
- ret_value=H5F_LOW_SPLIT;
- } /* end if */
- else
- ret_value=H5F_LOW_ERROR; /* error, or driver unknown to v1.2 */
-
- FUNC_LEAVE (ret_value);
-}
-
-#else /* WANT_H5_V1_2_COMPAT */
/*-------------------------------------------------------------------------
* Function: H5Pget_driver
@@ -1849,7 +1744,6 @@ H5Pget_driver(hid_t plist_id)
FUNC_LEAVE(ret_value);
}
-#endif /* WANT_H5_V1_2_COMPAT */
/*-------------------------------------------------------------------------
@@ -1955,705 +1849,6 @@ H5Pget_driver_info(hid_t plist_id)
FUNC_LEAVE(ret_value);
}
-#ifdef WANT_H5_V1_2_COMPAT
-
-/*-------------------------------------------------------------------------
- * Function: H5Pset_stdio
- *
- * Purpose: Set the low level file driver to use the functions declared
- * in the stdio.h file: fopen(), fseek() or fseek64(), fread(),
- * fwrite(), and fclose().
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Robb Matzke
- * Thursday, February 19, 1998
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5Pset_stdio(hid_t plist_id)
-{
- FUNC_ENTER (H5Pset_stdio, FAIL);
- H5TRACE1("e","i",plist_id);
-
- /* Check arguments */
- if (H5P_FILE_ACCESS != H5P_get_class(plist_id) ||
- NULL == H5I_object(plist_id)) {
- HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL,
- "not a file access property list");
- }
-
- FUNC_LEAVE(H5Pset_fapl_stdio(plist_id));
-}
-
-
-/*-------------------------------------------------------------------------
- * Function: H5Pget_stdio
- *
- * Purpose: If the file access property list is set to the stdio driver
- * then this function returns zero; otherwise it returns a
- * negative value. In the future, additional arguments may be
- * added to this function to match those added to H5Pset_stdio().
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Robb Matzke
- * Thursday, February 26, 1998
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5Pget_stdio(hid_t plist_id)
-{
- herr_t ret_value=FAIL;
-
- FUNC_ENTER (H5Pget_stdio, FAIL);
- H5TRACE1("e","i",plist_id);
-
- /* Check arguments and test driver */
- if (H5P_FILE_ACCESS==H5P_get_class(plist_id) &&
- (H5FD_STDIO == H5P_get_driver(plist_id))) {
- ret_value=SUCCEED;
- }
- else {
- HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL,
- "not a file access property list");
- }
-
- FUNC_LEAVE (ret_value);
-}
-
-
-/*-------------------------------------------------------------------------
- * Function: H5Pset_sec2
- *
- * Purpose: Set the low-level file driver to use the functions declared
- * in the unistd.h file: open(), lseek() or lseek64(), read(),
- * write(), and close().
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Robb Matzke
- * Thursday, February 19, 1998
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5Pset_sec2(hid_t plist_id)
-{
- FUNC_ENTER (H5Pset_sec2, FAIL);
- H5TRACE1("e","i",plist_id);
-
- /* Check arguments */
- if (H5P_FILE_ACCESS != H5P_get_class(plist_id) ||
- NULL == H5I_object(plist_id)) {
- HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL,
- "not a file access property list");
- }
-
- FUNC_LEAVE(H5Pset_fapl_sec2(plist_id));
-}
-
-
-/*-------------------------------------------------------------------------
- * Function: H5Pget_sec2
- *
- * Purpose: If the file access property list is set to the sec2 driver
- * then this function returns zero; otherwise it returns a
- * negative value. In the future, additional arguments may be
- * added to this function to match those added to H5Pset_sec2().
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Robb Matzke
- * Thursday, February 26, 1998
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5Pget_sec2(hid_t plist_id)
-{
- herr_t ret_value=FAIL;
-
- FUNC_ENTER (H5Pget_sec2, FAIL);
- H5TRACE1("e","i",plist_id);
-
- /* Check arguments and test driver */
- if (H5P_FILE_ACCESS==H5P_get_class(plist_id) &&
- (H5FD_SEC2 == H5P_get_driver(plist_id))) {
- ret_value=SUCCEED;
- }
- else {
- HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL,
- "not a file access property list");
- }
-
- FUNC_LEAVE (ret_value);
-}
-
-
-/*-------------------------------------------------------------------------
- * Function: H5Pset_core
- *
- * Purpose: Set the low-level file driver to use malloc() and free().
- * This driver is restricted to temporary files which are not
- * larger than the amount of virtual memory available. The
- * INCREMENT argument determines the file block size and memory
- * will be allocated in multiples of INCREMENT bytes. A liberal
- * INCREMENT results in fewer calls to realloc() and probably
- * less memory fragmentation.
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Robb Matzke
- * Thursday, February 19, 1998
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5Pset_core(hid_t plist_id, size_t increment)
-{
- FUNC_ENTER (H5Pset_core, FAIL);
- H5TRACE2("e","iz",plist_id,increment);
-
- /* Check arguments */
- if (H5P_FILE_ACCESS != H5P_get_class(plist_id) ||
- NULL == H5I_object(plist_id)) {
- HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL,
- "not a file access property list");
- }
- if (increment<1) {
- HRETURN_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL,
- "increment must be positive");
- }
-
- FUNC_LEAVE(H5Pset_fapl_core(plist_id,increment,0));
-}
-
-
-/*-------------------------------------------------------------------------
- * Function: H5Pget_core
- *
- * Purpose: If the file access property list is set to the core driver
- * then this function returns zero; otherwise it returns a
- * negative value. On success, the block size is returned
- * through the INCREMENT argument if it isn't the null pointer.
- * In the future, additional arguments may be added to this
- * function to match those added to H5Pset_core().
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Robb Matzke
- * Thursday, February 26, 1998
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5Pget_core(hid_t plist_id, size_t *increment/*out*/)
-{
- herr_t ret_value=FAIL;
-
- FUNC_ENTER (H5Pget_core, FAIL);
- H5TRACE2("e","ix",plist_id,increment);
-
- /* Check arguments */
- if (H5P_FILE_ACCESS==H5P_get_class(plist_id) &&
- (H5FD_CORE == H5P_get_driver(plist_id)) &&
- H5Pget_fapl_core(plist_id,increment,NULL)>=0) {
- ret_value=SUCCEED;
- }
- else {
- HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL,
- "not a file access property list");
- }
-
- FUNC_LEAVE (ret_value);
-}
-
-
-/*-------------------------------------------------------------------------
- * Function: H5Pset_split
- *
- * Purpose: Set the low-level driver to split meta data from raw data,
- * storing meta data in one file and raw data in another file.
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Robb Matzke
- * Thursday, February 19, 1998
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5Pset_split(hid_t plist_id, const char *meta_ext, hid_t meta_plist_id,
- const char *raw_ext, hid_t raw_plist_id)
-{
- FUNC_ENTER (H5Pset_split, FAIL);
- H5TRACE5("e","isisi",plist_id,meta_ext,meta_plist_id,raw_ext,raw_plist_id);
-
- /* Check arguments */
- if (H5P_FILE_ACCESS != H5P_get_class(plist_id) ||
- NULL == H5I_object(plist_id)) {
- HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL,
- "not a file access property list");
- }
- if (H5P_DEFAULT!=meta_plist_id &&
- (H5P_FILE_ACCESS != H5P_get_class(meta_plist_id) ||
- NULL == H5I_object(meta_plist_id))) {
- HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL,
- "not a file access property list");
- }
- if (H5P_DEFAULT!=raw_plist_id &&
- (H5P_FILE_ACCESS != H5P_get_class(raw_plist_id) ||
- NULL == H5I_object(raw_plist_id))) {
- HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL,
- "not a file access property list");
- }
-
- /* Set driver */
- FUNC_LEAVE (H5Pset_fapl_split(plist_id,meta_ext,meta_plist_id,raw_ext,raw_plist_id));
-}
-
-
-/*-------------------------------------------------------------------------
- * Function: H5Pget_split
- *
- * Purpose: If the file access property list is set to the sec2 driver
- * then this function returns zero; otherwise it returns a
- * negative value. On success, at most META_EXT_SIZE characters
- * are copied to the META_EXT buffer if non-null and at most
- * RAW_EXT_SIZE characters are copied to the RAW_EXT buffer if
- * non-null. If the actual extension is larger than the number
- * of characters requested then the buffer will not be null
- * terminated (that is, behavior like strncpy()). In addition,
- * if META_PROPERTIES and/or RAW_PROPERTIES are non-null then
- * the file access property list of the meta file and/or raw
- * file is copied and its OID returned through these arguments.
- * In the future, additional arguments may be added to this
- * function to match those added to H5Pset_sec2().
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Robb Matzke
- * Thursday, February 26, 1998
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5Pget_split(hid_t plist_id, size_t meta_ext_size, char *meta_ext/*out*/,
- hid_t *meta_properties/*out*/, size_t raw_ext_size,
- char *raw_ext/*out*/, hid_t *raw_properties/*out*/)
-{
- H5FD_mem_t mt;
- H5FD_mem_t _memb_map[H5FD_MEM_NTYPES];
- hid_t _memb_fapl[H5FD_MEM_NTYPES];
- char _memb_name[H5FD_MEM_NTYPES][16];
- char *_memb_name_ptrs[H5FD_MEM_NTYPES];
- haddr_t _memb_addr[H5FD_MEM_NTYPES];
-
- FUNC_ENTER (H5Pget_split, FAIL);
- H5TRACE7("e","izxxzxx",plist_id,meta_ext_size,meta_ext,meta_properties,
- raw_ext_size,raw_ext,raw_properties);
-
- /* Check arguments */
- if (H5P_FILE_ACCESS != H5P_get_class (plist_id) ||
- NULL == H5I_object (plist_id)) {
- HRETURN_ERROR (H5E_ARGS, H5E_BADTYPE, FAIL,
- "not a file access property list");
- }
- if (H5FD_MULTI != H5P_get_driver(plist_id)) {
- HRETURN_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL,
- "the split driver is not set");
- }
-
- /* Reset output args for error handling */
- if (meta_ext && meta_ext_size>0)
- *meta_ext = '\0';
- if (raw_ext && raw_ext_size>0)
- *raw_ext = '\0';
- if (meta_properties)
- *meta_properties = FAIL;
- if (raw_properties)
- *raw_properties = FAIL;
-
- /* Set up the member extention pointers */
- for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt++)
- _memb_name_ptrs[mt] = &_memb_name[mt][0];
-
- /* Get the information from the multi file driver */
- if (H5Pget_fapl_multi(plist_id,_memb_map,_memb_fapl,_memb_name_ptrs,_memb_addr,NULL)<0) {
- HRETURN_ERROR (H5E_PLIST, H5E_NOTFOUND, FAIL,
- "can't get split file information");
- }
-
- /* Output arguments */
- if (meta_ext && meta_ext_size>0) {
- if (_memb_name[H5FD_MEM_SUPER]) {
- HDstrncpy (meta_ext, _memb_name[H5FD_MEM_SUPER], meta_ext_size);
- } else {
- HDstrncpy (meta_ext, ".meta", meta_ext_size);
- }
- }
- if (raw_ext && raw_ext_size>0) {
- if (_memb_name[H5FD_MEM_DRAW]) {
- HDstrncpy (raw_ext, _memb_name[H5FD_MEM_DRAW], raw_ext_size);
- } else {
- HDstrncpy (raw_ext, ".raw", raw_ext_size);
- }
- }
- if (meta_properties) {
- *meta_properties = _memb_fapl[H5FD_MEM_SUPER];
- }
- if (raw_properties) {
- *raw_properties = _memb_fapl[H5FD_MEM_DRAW];
- }
-
- FUNC_LEAVE (SUCCEED);
-}
-
-
-/*-------------------------------------------------------------------------
- * Function: H5Pset_family
- *
- * Purpose: Sets the low-level driver to stripe the hdf5 address space
- * across a family of files. The MEMB_SIZE argument indicates
- * the size in bytes of each family member and is only
- * meaningful when creating new files or opening families that
- * have only one member.
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Robb Matzke
- * Thursday, February 19, 1998
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5Pset_family(hid_t plist_id, hsize_t memb_size, hid_t memb_plist_id)
-{
- FUNC_ENTER (H5Pset_family, FAIL);
- H5TRACE3("e","ihi",plist_id,memb_size,memb_plist_id);
-
- /* Check arguments */
- if (H5P_FILE_ACCESS != H5P_get_class(plist_id) ||
- NULL == H5I_object(plist_id)) {
- HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL,
- "not a file access property list");
- }
- if (memb_size && memb_size<1024) {
- HRETURN_ERROR (H5E_ARGS, H5E_BADRANGE, FAIL,
- "family member size is too small");
- }
- if (H5P_DEFAULT!=memb_plist_id &&
- (H5P_FILE_ACCESS != H5P_get_class(memb_plist_id) ||
- NULL == H5I_object(memb_plist_id))) {
- HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL,
- "not a file access property list");
- }
-
- /* Set driver */
- FUNC_LEAVE(H5Pset_fapl_family(plist_id,memb_size,memb_plist_id));
-}
-
-
-/*-------------------------------------------------------------------------
- * Function: H5Pget_family
- *
- * Purpose: If the file access property list is set to the family driver
- * then this function returns zero; otherwise it returns a
- * negative value. On success, if MEMB_PLIST_ID is a non-null
- * pointer it will be initialized with the id of an open
- * property list: the file access property list for the family
- * members. In the future, additional arguments may be added to
- * this function to match those added to H5Pset_family().
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Robb Matzke
- * Thursday, February 26, 1998
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5Pget_family(hid_t plist_id, hsize_t *memb_size/*out*/,
- hid_t *memb_plist_id/*out*/)
-{
- FUNC_ENTER (H5Pget_family, FAIL);
- H5TRACE3("e","ixx",plist_id,memb_size,memb_plist_id);
-
- /* Check arguments */
- if (H5P_FILE_ACCESS != H5P_get_class (plist_id) ||
- NULL == H5I_object (plist_id)) {
- HRETURN_ERROR (H5E_ARGS, H5E_BADTYPE, FAIL,
- "not a file access property list");
- }
- if (H5FD_FAMILY == H5P_get_driver(plist_id)) {
- HRETURN_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL,
- "the family driver is not set");
- }
-
- /* Retrieve args */
- FUNC_LEAVE (H5Pget_fapl_family(plist_id,memb_size,memb_plist_id));
-}
-
-
-#ifdef HAVE_PARALLEL
-/*-------------------------------------------------------------------------
- * Function: H5Pset_mpi
- *
- * Signature: herr_t H5Pset_mpi(hid_t plist_id, MPI_Comm comm, MPI_Info info)
- *
- * Purpose: Store the access mode for MPIO call and the user supplied
- * communicator and info in the access property list which can
- * then be used to open file. This function is available only
- * in the parallel HDF5 library and is not a collective
- * function.
- *
- * Parameters:
- * hid_t plist_id
- * ID of property list to modify
- * MPI_Comm comm
- * MPI communicator to be used for file open as defined in
- * MPI_FILE_OPEN of MPI-2. This function does not make a
- * duplicated communicator. Any modification to comm after
- * this function call returns may have undetermined effect
- * to the access property list. Users should call this
- * function again to setup the property list.
- * MPI_Info info
- * MPI info object to be used for file open as defined in
- * MPI_FILE_OPEN of MPI-2. This function does not make a
- * duplicated info. Any modification to info after
- * this function call returns may have undetermined effect
- * to the access property list. Users should call this
- * function again to setup the property list.
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Albert Cheng
- * Feb 3, 1998
- *
- * Modifications:
- *
- * Robb Matzke, 18 Feb 1998
- * Check all arguments before the property list is updated so we don't
- * leave the property list in a bad state if something goes wrong. Also,
- * the property list data type changed to allow more generality so all
- * the mpi-related stuff is in the `u.mpi' member. The `access_mode'
- * will contain only mpi-related flags defined in H5Fpublic.h.
- *
- * Albert Cheng, Apr 16, 1998
- * Removed the access_mode argument. The access_mode is changed
- * to be controlled by data transfer property list during data
- * read/write calls.
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5Pset_mpi(hid_t plist_id, MPI_Comm comm, MPI_Info info)
-{
- FUNC_ENTER(H5Pset_mpi, FAIL);
- H5TRACE3("e","iMcMi",plist_id,comm,info);
-
- /* Check arguments */
- if (H5P_FILE_ACCESS != H5P_get_class(plist_id) ||
- NULL == H5I_object(plist_id)) {
- HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL,
- "not a file access property list");
- }
-
- /* Set driver */
- FUNC_LEAVE(H5Pset_fapl_mpio(plist_id,comm,info));
-}
-
-
-/*-------------------------------------------------------------------------
- * Function: H5Pget_mpi
- *
- * Purpose: If the file access property list is set to the mpi driver
- * then this function returns zero; otherwise it returns a
- * negative value. In the future, additional arguments may be
- * added to this function to match those added to H5Pset_mpi().
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Robb Matzke
- * Thursday, February 26, 1998
- *
- * Modifications:
- *
- * Albert Cheng, Apr 16, 1998
- * Removed the access_mode argument. The access_mode is changed
- * to be controlled by data transfer property list during data
- * read/write calls.
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5Pget_mpi(hid_t plist_id, MPI_Comm *comm, MPI_Info *info)
-{
- FUNC_ENTER (H5Pget_mpi, FAIL);
- H5TRACE3("e","i*Mc*Mi",plist_id,comm,info);
-
- /* Check arguments */
- if (H5P_FILE_ACCESS != H5P_get_class (plist_id) ||
- NULL == H5I_object (plist_id)) {
- HRETURN_ERROR (H5E_ARGS, H5E_BADTYPE, FAIL,
- "not a file access property list");
- }
- if (H5FD_MPIO == H5P_get_driver(plist_id)) {
- HRETURN_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL,
- "the mpi driver is not set");
- }
-
- /* Retrieve args */
- FUNC_LEAVE (H5Pget_fapl_mpio(plist_id,comm,info));
-}
-
-
-/*-------------------------------------------------------------------------
- * Function: H5Pset_xfer
- *
- * Signature: herr_t H5Pset_xfer(hid_t plist_id,
- * H5D_transfer_t data_xfer_mode)
- *
- * Purpose: Set the transfer mode of the dataset transfer property list.
- * The list can then be used to control the I/O transfer mode
- * during dataset accesses. This function is available only
- * in the parallel HDF5 library and is not a collective function.
- *
- * Parameters:
- * hid_t plist_id
- * ID of a dataset transfer property list
- * H5D_transfer_t data_xfer_mode
- * Data transfer modes:
- * H5D_XFER_INDEPENDENT
- * Use independent I/O access.
- * H5D_XFER_COLLECTIVE
- * Use MPI collective I/O access.
- * H5D_XFER_DFLT
- * Use default I/O access. Currently,
- * independent is the default mode.
- *
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Albert Cheng
- * April 2, 1998
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5Pset_xfer(hid_t plist_id, H5D_transfer_t data_xfer_mode)
-{
- H5FD_mpio_xfer_t dx_xfer_mode;
-
- FUNC_ENTER(H5Pset_xfer, FAIL);
- H5TRACE2("e","iDt",plist_id,data_xfer_mode);
-
- /* Check arguments */
- if (H5P_DATASET_XFER != H5P_get_class(plist_id) ||
- NULL == H5I_object(plist_id)) {
- HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL,
- "not a dataset transfer property list");
- }
-
- switch (data_xfer_mode) {
- case H5D_XFER_COLLECTIVE:
- dx_xfer_mode = H5FD_MPIO_COLLECTIVE;
- break;
-
- case H5D_XFER_INDEPENDENT:
- case H5D_XFER_DFLT:
- dx_xfer_mode = H5FD_MPIO_INDEPENDENT;
- break;
-
- default:
- HRETURN_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL,
- "invalid dataset transfer mode");
- }
-
- FUNC_LEAVE(H5Pset_dxpl_mpio(plist_id,dx_xfer_mode));
-}
-
-
-/*-------------------------------------------------------------------------
- * Function: H5Pget_xfer
- *
- * Purpose: Reads the transfer mode current set in the property list.
- * This function is available only in the parallel HDF5 library
- * and is not a collective function.
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Albert Cheng
- * April 2, 1998
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5Pget_xfer(hid_t plist_id, H5D_transfer_t *data_xfer_mode)
-{
- H5FD_mpio_xfer_t dx_xfer_mode;
-
- FUNC_ENTER (H5Pget_xfer, FAIL);
- H5TRACE2("e","i*Dt",plist_id,data_xfer_mode);
-
- /* Check arguments */
- if (H5P_DATASET_XFER != H5P_get_class(plist_id) ||
- NULL == H5I_object(plist_id)) {
- HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL,
- "not a dataset transfer property list");
- }
-
- if(data_xfer_mode) {
- if(H5Pget_dxpl_mpio(plist_id,&dx_xfer_mode)<0) {
- HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL,
- "not a dataset transfer property list");
- }
- switch(dx_xfer_mode) {
- H5FD_MPIO_INDEPENDENT:
- *data_xfer_mode = H5D_XFER_INDEPENDENT;
- break;
-
- H5FD_MPIO_COLLECTIVE:
- *data_xfer_mode = H5D_XFER_COLLECTIVE;
- break;
- default:
- HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL,
- "unknown transfer mode");
- } /* end switch */
- } /* end if */
-
- FUNC_LEAVE (SUCCEED);
-}
-#endif /* HAVE_PARALLEL */
-#endif /* WANT_H5_V1_2_COMPAT */
-
/*-------------------------------------------------------------------------
* Function: H5Pset_cache
diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h
index edd413a..ee925dc 100644
--- a/src/H5Ppublic.h
+++ b/src/H5Ppublic.h
@@ -156,31 +156,7 @@ __DLL__ herr_t H5Pget_external(hid_t plist_id, int idx, size_t name_size,
hsize_t *size/*out*/);
__DLL__ herr_t H5Pset_driver(hid_t plist_id, hid_t driver_id,
const void *driver_info);
-#if defined(WANT_H5_V1_2_COMPAT) || defined(H5_WANT_H5_V1_2_COMPAT)
-__DLL__ H5F_driver_t H5Pget_driver(hid_t plist_id);
-__DLL__ herr_t H5Pset_stdio(hid_t plist_id);
-__DLL__ herr_t H5Pget_stdio(hid_t plist_id);
-__DLL__ herr_t H5Pset_sec2(hid_t plist_id);
-__DLL__ herr_t H5Pget_sec2(hid_t plist_id);
-__DLL__ herr_t H5Pset_core(hid_t plist_id, size_t increment);
-__DLL__ herr_t H5Pget_core(hid_t plist_id, size_t *increment/*out*/);
-__DLL__ herr_t H5Pset_split(hid_t plist_id, const char *meta_ext, hid_t meta_plist_id,
- const char *raw_ext, hid_t raw_plist_id);
-__DLL__ herr_t H5Pget_split(hid_t plist_id, size_t meta_ext_size, char *meta_ext/*out*/,
- hid_t *meta_properties/*out*/, size_t raw_ext_size,
- char *raw_ext/*out*/, hid_t *raw_properties/*out*/);
-__DLL__ herr_t H5Pset_family(hid_t plist_id, hsize_t memb_size, hid_t memb_plist_id);
-__DLL__ herr_t H5Pget_family(hid_t plist_id, hsize_t *memb_size/*out*/,
- hid_t *memb_plist_id/*out*/);
-#if defined(HAVE_PARALLEL) || defined (H5_HAVE_PARALLEL)
-__DLL__ herr_t H5Pset_mpi(hid_t plist_id, MPI_Comm comm, MPI_Info info);
-__DLL__ herr_t H5Pget_mpi(hid_t plist_id, MPI_Comm *comm, MPI_Info *info);
-__DLL__ herr_t H5Pset_xfer(hid_t plist_id, H5D_transfer_t data_xfer_mode);
-__DLL__ herr_t H5Pget_xfer(hid_t plist_id, H5D_transfer_t *data_xfer_mode);
-#endif /*HAVE_PARALLEL*/
-#else /* WANT_H5_V1_2_COMPAT */
__DLL__ hid_t H5Pget_driver(hid_t plist_id);
-#endif /* WANT_H5_V1_2_COMPAT */
__DLL__ void *H5Pget_driver_info(hid_t plist_id);
__DLL__ herr_t H5Pset_buffer(hid_t plist_id, size_t size, void *tconv,
void *bkg);
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
diff --git a/src/H5Tpublic.h b/src/H5Tpublic.h
index 716cf0d..06ef8bf 100644
--- a/src/H5Tpublic.h
+++ b/src/H5Tpublic.h
@@ -457,11 +457,6 @@ __DLL__ htri_t H5Tcommitted(hid_t type_id);
/* Operations defined on compound data types */
__DLL__ herr_t H5Tinsert(hid_t parent_id, const char *name, size_t offset,
hid_t member_id);
-#if defined(WANT_H5_V1_2_COMPAT) || defined(H5_WANT_H5_V1_2_COMPAT)
-__DLL__ herr_t H5Tinsert_array(hid_t parent_id, const char *name,
- size_t offset, int ndims, const size_t dim[],
- const int *perm, hid_t member_id);
-#endif /* WANT_H5_V1_2_COMPAT */
__DLL__ herr_t H5Tpack(hid_t type_id);
/* Operations defined on enumeration data types */
@@ -506,10 +501,6 @@ __DLL__ H5T_str_t H5Tget_strpad(hid_t type_id);
__DLL__ int H5Tget_nmembers(hid_t type_id);
__DLL__ char *H5Tget_member_name(hid_t type_id, int membno);
__DLL__ size_t H5Tget_member_offset(hid_t type_id, int membno);
-#if defined(WANT_H5_V1_2_COMPAT) || defined(H5_WANT_H5_V1_2_COMPAT)
-__DLL__ int H5Tget_member_dims(hid_t type_id, int membno, size_t dims[]/*out*/,
- int perm[]/*out*/);
-#endif /* WANT_H5_V1_2_COMPAT */
__DLL__ H5T_class_t H5Tget_member_class(hid_t type_id, int membno);
__DLL__ hid_t H5Tget_member_type(hid_t type_id, int membno);
__DLL__ herr_t H5Tget_member_value(hid_t type_id, int membno,
diff --git a/src/H5config.h.in b/src/H5config.h.in
index 969c801..5578395 100644
--- a/src/H5config.h.in
+++ b/src/H5config.h.in
@@ -50,8 +50,8 @@
/* Define if it's safe to use `long long' for hsize_t and hssize_t */
#undef DEV_T_IS_SCALAR
-/* Define if the HDF5 v1.2 compatibility functions are to be compiled in */
-#undef WANT_H5_V1_2_COMPAT
+/* Define if the HDF5 v1.4 compatibility functions are to be compiled in */
+#undef WANT_H5_V1_4_COMPAT
/* Width for printf() for type `long long' or `__int64', us. `ll' */
#undef PRINTF_LL_WIDTH
diff --git a/test/big.c b/test/big.c
index a35d974..42819de 100644
--- a/test/big.c
+++ b/test/big.c
@@ -120,11 +120,7 @@ enough_room(hid_t fapl)
for (i=0; i<NELMTS(fd); i++) fd[i] = -1;
/* Get file name template */
-#ifdef H5_WANT_H5_V1_2_COMPAT
- assert(H5F_LOW_FAMILY==H5Pget_driver(fapl));
-#else /* H5_WANT_H5_V1_2_COMPAT */
assert(H5FD_FAMILY==H5Pget_driver(fapl));
-#endif /* H5_WANT_H5_V1_2_COMPAT */
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
/* Create files */
@@ -370,11 +366,7 @@ main (void)
fapl = h5_fileaccess();
/* The file driver must be the family driver */
-#ifdef H5_WANT_H5_V1_2_COMPAT
- if (H5F_LOW_FAMILY!=H5Pget_driver(fapl)) {
-#else /* H5_WANT_H5_V1_2_COMPAT */
if (H5FD_FAMILY!=H5Pget_driver(fapl)) {
-#endif /* H5_WANT_H5_V1_2_COMPAT */
printf("Changing file drivers to the family driver, %lu bytes each\n",
(unsigned long)FAMILY_SIZE);
if (H5Pset_fapl_family(fapl, (hsize_t)FAMILY_SIZE, H5P_DEFAULT)<0) goto error;
diff --git a/test/h5test.c b/test/h5test.c
index 0571493..c647a21 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -126,45 +126,13 @@ h5_cleanup(const char *base_name[], hid_t fapl)
char temp[2048];
int i, j;
int retval=0;
-#ifndef H5_WANT_H5_V1_2_COMPAT
hid_t driver;
-#endif /* H5_WANT_H5_V1_2_COMPAT */
if (!HDgetenv("HDF5_NOCLEANUP")) {
for (i = 0; base_name[i]; i++) {
if (h5_fixname(base_name[i], fapl, filename, sizeof(filename)) == NULL)
continue;
-#ifdef H5_WANT_H5_V1_2_COMPAT
- switch (H5Pget_driver(fapl)) {
- case H5F_LOW_CORE:
- break; /*nothing to remove*/
-
- case H5F_LOW_SPLIT:
- HDsnprintf(temp, sizeof(temp), "%s.raw", filename);
- HDremove(temp);
- HDsnprintf(temp, sizeof(temp), "%s.meta", filename);
- HDremove(temp);
- break;
-
- case H5F_LOW_FAMILY:
- for (j = 0; /*void*/; j++) {
- HDsnprintf(temp, sizeof(temp), filename, j);
-
- if (HDaccess(temp, F_OK) < 0)
- break;
-
- HDremove(temp);
- }
-
- break;
-
- default:
- HDremove(filename);
- break;
- }
-#else /* H5_WANT_H5_V1_2_COMPAT */
-
driver = H5Pget_driver(fapl);
if (driver == H5FD_FAMILY) {
@@ -190,7 +158,6 @@ h5_cleanup(const char *base_name[], hid_t fapl)
} else {
HDremove(filename);
}
-#endif /* H5_WANT_H5_V1_2_COMPAT */
}
retval = 1;
@@ -276,54 +243,13 @@ h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size)
const char *suffix = ".h5"; /* suffix has default */
char *ptr, last = '\0';
size_t i, j;
-#ifdef H5_WANT_H5_V1_2_COMPAT
- H5F_driver_t driver;
-#else
hid_t driver;
-#endif /* H5_WANT_H5_V1_2_COMPAT */
if (!base_name || !fullname || size < 1)
return NULL;
memset(fullname, 0, size);
-#ifdef H5_WANT_H5_V1_2_COMPAT
- /* figure out the suffix */
- if (H5P_DEFAULT != fapl){
- if ((driver = H5Pget_driver(fapl)) < 0)
- return NULL;
-
- if (H5F_LOW_FAMILY == driver) {
- suffix = "%05d.h5";
- } else if (H5F_LOW_CORE == driver) {
- suffix = NULL;
- }
- }
-
- /* Use different ones depending on parallel or serial driver used. */
- if (H5P_DEFAULT != fapl && H5F_LOW_MPIO == driver){
- /* For parallel:
- * First use command line option, then the environment variable,
- * then try the constant
- */
- prefix = (paraprefix ? paraprefix : getenv("HDF5_PARAPREFIX"));
-
-#ifdef HDF5_PARAPREFIX
- if (!prefix)
- prefix = HDF5_PARAPREFIX;
-#endif /* HDF5_PARAPREFIX */
- }else{
- /* For serial:
- * First use the environment variable, then try the constant
- */
- prefix = HDgetenv("HDF5_PREFIX");
-
-#ifdef HDF5_PREFIX
- if (!prefix)
- prefix = HDF5_PREFIX;
-#endif /* HDF5_PREFIX */
- }
-#else /* H5_WANT_H5_V1_2_COMPAT */
/* figure out the suffix */
if (H5P_DEFAULT != fapl){
if ((driver = H5Pget_driver(fapl)) < 0)
@@ -358,15 +284,10 @@ h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size)
prefix = HDF5_PREFIX;
#endif /* HDF5_PREFIX */
}
-#endif /* H5_WANT_H5_V1_2_COMPAT */
/* Prepend the prefix value to the base name */
if (prefix && *prefix) {
-#ifdef H5_WANT_H5_V1_2_COMPAT
- if (H5P_DEFAULT != fapl && H5F_LOW_MPIO == driver) {
-#else
if (H5P_DEFAULT != fapl && H5FD_MPIO == driver) {
-#endif /* H5_WANT_H5_V1_2_COMPAT */
/* This is a parallel system */
char *subdir;
@@ -426,25 +347,6 @@ h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size)
HDstrcpy(fullname, base_name);
}
-#ifdef H5_WANT_H5_V1_2_COMPAT
- /* Append a suffix */
- if ((driver = H5Pget_driver(fapl)) < 0)
- return NULL;
-
- switch (driver) {
- case H5F_LOW_SPLIT:
- case H5F_LOW_CORE:
- suffix = NULL;
- break;
- case H5F_LOW_FAMILY:
- suffix = "%05d.h5";
- break;
- default:
- suffix = ".h5";
- break;
- }
-#endif /* H5_WANT_H5_V1_2_COMPAT */
-
/* Append a suffix */
if (suffix) {
if (HDstrlen(fullname) + HDstrlen(suffix) >= size)
diff --git a/test/istore.c b/test/istore.c
index 0961bc8..78142f7 100644
--- a/test/istore.c
+++ b/test/istore.c
@@ -562,11 +562,7 @@ main(int argc, char *argv[])
* For testing file families, fool the library into thinking it already
* allocated a whole bunch of data.
*/
-#ifdef H5_WANT_H5_V1_2_COMPAT
- if (H5F_LOW_FAMILY==H5Pget_driver(fapl)) {
-#else /* H5_WANT_H5_V1_2_COMPAT */
if (H5FD_FAMILY==H5Pget_driver(fapl)) {
-#endif /* H5_WANT_H5_V1_2_COMPAT */
haddr_t addr;
addr = 8 * ((uint64_t)1<<30); /*8 GB */
if (H5FDset_eoa(f->shared->lf, addr)<0) {
diff --git a/test/tarray.c b/test/tarray.c
index 4175d9f..9e5853b 100644
--- a/test/tarray.c
+++ b/test/tarray.c
@@ -695,9 +695,6 @@ test_array_compound_array(void)
typedef struct { /* Typedef for compound datatype */
int i;
float f[ARRAY1_DIM1];
-#ifdef WANT_H5_V1_2_COMPAT
- double d[ARRAY1_DIM1];
-#endif /* WANT_H5_V1_2_COMPAT */
} s1_t;
s1_t wdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information to write */
s1_t rdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information read in */
@@ -709,16 +706,8 @@ test_array_compound_array(void)
hid_t tid3; /* Nested Array Datatype ID */
hsize_t sdims1[] = {SPACE1_DIM1};
hsize_t tdims1[] = {ARRAY1_DIM1};
-#ifdef WANT_H5_V1_2_COMPAT
- size_t msize;
- size_t otdims1[] = {ARRAY1_DIM1};
-#endif /* WANT_H5_V1_2_COMPAT */
int ndims; /* Array rank for reading */
hsize_t rdims1[H5S_MAX_RANK]; /* Array dimensions for reading */
-#ifdef WANT_H5_V1_2_COMPAT
- size_t rdims2[H5S_MAX_RANK]; /* Array dimensions for reading */
- size_t ordims1[H5S_MAX_RANK]; /* Array dimensions for reading */
-#endif /* WANT_H5_V1_2_COMPAT */
int nmemb; /* Number of compound members */
char *mname; /* Name of compound field */
size_t off; /* Offset of compound field */
@@ -736,10 +725,6 @@ test_array_compound_array(void)
wdata[i][j].i=i*10+j;
for(k=0; k<ARRAY1_DIM1; k++)
wdata[i][j].f[k]=i*10+j*2.5+k;
-#ifdef WANT_H5_V1_2_COMPAT
- for(k=0; k<ARRAY1_DIM1; k++)
- wdata[i][j].d[k]=i*15+j*7.5+k;
-#endif /* WANT_H5_V1_2_COMPAT */
} /* end for */
/* Create file */
@@ -770,13 +755,6 @@ test_array_compound_array(void)
ret=H5Tclose(tid3);
CHECK(ret, FAIL, "H5Tclose");
-/* Compatibility code to verify that the old API functions are still working */
-#ifdef WANT_H5_V1_2_COMPAT
- /* Insert double array field */
- ret = H5Tinsert_array (tid2, "d", HOFFSET(s1_t,d), ARRAY1_RANK,otdims1,NULL,H5T_NATIVE_DOUBLE);
- CHECK(ret, FAIL, "H5Tinsert_array");
-#endif /* WANT_H5_V1_2_COMPAT */
-
/* Create an array datatype to refer to */
tid1 = H5Tarray_create (tid2,ARRAY1_RANK,tdims1,NULL);
CHECK(tid1, FAIL, "H5Tarray_create");
@@ -844,11 +822,7 @@ test_array_compound_array(void)
/* Check the number of members */
nmemb=H5Tget_nmembers(tid2);
-#ifdef WANT_H5_V1_2_COMPAT
- VERIFY(nmemb,3,"H5Tget_nmembers");
-#else /* WANT_H5_V1_2_COMPAT */
VERIFY(nmemb,2,"H5Tget_nmembers");
-#endif /* WANT_H5_V1_2_COMPAT */
/* Check the 1st field's name */
mname=H5Tget_member_name(tid2,0);
@@ -890,29 +864,6 @@ test_array_compound_array(void)
mtid=H5Tget_member_type(tid2,1);
CHECK(mtid, FAIL, "H5Tget_member_type");
-#ifdef WANT_H5_V1_2_COMPAT
- /* H5Tget_member_type() returns the base type in v1.2 */
- /* Get the 2nd field's class */
- mclass=H5Tget_class(mtid);
- VERIFY(mclass, H5T_FLOAT, "H5Tget_class");
-
- /* Get the 2nd field's size */
- msize=H5Tget_size(mtid);
- VERIFY(msize, sizeof(float), "H5Tget_size");
-
- /* Get the array dimensions */
- ndims=H5Tget_member_dims(tid2,1,rdims2,NULL);
- VERIFY(ndims, ARRAY1_RANK, "H5Tget_member_dims");
- VERIFY(rdims2[0], ARRAY1_DIM1, "H5Tget_member_dims");
-
- /* Check the array dimensions */
- for(i=0; i<ndims; i++)
- if(rdims2[i]!=tdims1[i]) {
- num_errs++;
- printf("Nested array dimension information doesn't match!, rdims2[%d]=%d, tdims1[%d]=%d\n",(int)i,(int)rdims2[i],(int)i,(int)tdims1[i]);
- continue;
- } /* end if */
-#else /* WANT_H5_V1_2_COMPAT */
/* Get the 2nd field's class */
mclass=H5Tget_class(mtid);
VERIFY(mclass, H5T_ARRAY, "H5Tget_class");
@@ -945,58 +896,11 @@ test_array_compound_array(void)
/* Close the array's base type datatype */
ret=H5Tclose(tid3);
CHECK(mtid, FAIL, "H5Tclose");
-#endif /* WANT_H5_V1_2_COMPAT */
/* Close the member datatype */
ret=H5Tclose(mtid);
CHECK(mtid, FAIL, "H5Tclose");
-/* Compatibility code to verify that the old API functions are still working */
-#ifdef WANT_H5_V1_2_COMPAT
- /* Check the 3rd field's name */
- mname=H5Tget_member_name(tid2,2);
- CHECK(mname, NULL, "H5Tget_member_name");
- if(HDstrcmp(mname,"d")!=0) {
- num_errs++;
- printf("Compound field name doesn't match!, mname=%s\n",mname);
- } /* end if */
- free(mname);
-
- /* Check the 3rd field's offset */
- off=H5Tget_member_offset(tid2,2);
- VERIFY(off, HOFFSET(s1_t,d), "H5Tget_member_offset");
-
- /* Check the 2nd field's datatype */
- mtid=H5Tget_member_type(tid2,2);
- CHECK(mtid, FAIL, "H5Tget_member_type");
-
- /* H5Tget_member_type() returns the base type in v1.2 */
- /* Get the 3rd field's class */
- mclass=H5Tget_class(mtid);
- VERIFY(mclass, H5T_FLOAT, "H5Tget_class");
-
- /* Get the 3rd field's size */
- msize=H5Tget_size(mtid);
- VERIFY(msize, sizeof(double), "H5Tget_size");
-
- /* Check the array rank */
- ndims=H5Tget_member_dims(tid2,2,ordims1,NULL);
- VERIFY(ndims,ARRAY1_RANK,"H5Tget_member_dims");
-
- /* Check the array dimensions */
- for(i=0; i<ndims; i++)
- if(ordims1[i]!=otdims1[i]) {
- num_errs++;
- printf("Nested array dimension information doesn't match!, ordims1[%d]=%d, otdims1[%d]=%d\n",(int)i,(int)ordims1[i],(int)i,(int)otdims1[i]);
- continue;
- } /* end if */
-
- /* Close the member datatype */
- ret=H5Tclose(mtid);
- CHECK(mtid, FAIL, "H5Tclose");
-
-#endif /* WANT_H5_V1_2_COMPAT */
-
/* Close Compound Datatype */
ret = H5Tclose(tid2);
CHECK(ret, FAIL, "H5Tclose");
@@ -1875,20 +1779,16 @@ test_compat(void)
hid_t fid1; /* HDF5 File IDs */
hid_t dataset; /* Dataset ID */
hid_t tid1; /* Array Datatype ID */
-#ifndef WANT_H5_V1_2_COMPAT
hid_t tid2; /* Datatype ID */
hsize_t tdims1[] = {ARRAY1_DIM1};
int ndims; /* Array rank for reading */
hsize_t rdims1[H5S_MAX_RANK]; /* Array dimensions for reading */
-#endif /* !WANT_H5_V1_2_COMPAT */
H5T_class_t mclass; /* Datatype class for VL */
int nmemb; /* Number of compound members */
char *mname; /* Name of compound field */
size_t off; /* Offset of compound field */
hid_t mtid; /* Datatype ID for field */
-#ifndef WANT_H5_V1_2_COMPAT
intn i; /* Index variables */
-#endif /* !WANT_H5_V1_2_COMPAT */
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -2062,7 +1962,6 @@ test_compat(void)
off=H5Tget_member_offset(tid1,1);
VERIFY(off, 4, "H5Tget_member_offset");
-#ifndef WANT_H5_V1_2_COMPAT
/* Check the 2nd field's datatype */
mtid=H5Tget_member_type(tid1,1);
CHECK(mtid, FAIL, "H5Tget_member_type");
@@ -2099,7 +1998,6 @@ test_compat(void)
CHECK(ret, FAIL, "H5Tclose");
ret=H5Tclose(mtid);
CHECK(ret, FAIL, "H5Tclose");
-#endif /* !WANT_H5_V1_2_COMPAT */
/* Check the 3rd field's name */
mname=H5Tget_member_name(tid1,2);
@@ -2114,7 +2012,6 @@ test_compat(void)
off=H5Tget_member_offset(tid1,2);
VERIFY(off, 20, "H5Tget_member_offset");
-#ifndef WANT_H5_V1_2_COMPAT
/* Check the 3rd field's datatype */
mtid=H5Tget_member_type(tid1,2);
CHECK(mtid, FAIL, "H5Tget_member_type");
@@ -2151,7 +2048,6 @@ test_compat(void)
CHECK(ret, FAIL, "H5Tclose");
ret=H5Tclose(mtid);
CHECK(ret, FAIL, "H5Tclose");
-#endif /* !WANT_H5_V1_2_COMPAT */
/* Check the 4th field's name */
mname=H5Tget_member_name(tid1,3);
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);