summaryrefslogtreecommitdiffstats
path: root/hl
diff options
context:
space:
mode:
Diffstat (limited to 'hl')
-rw-r--r--hl/examples/ex_ds1.c6
-rw-r--r--hl/fortran/src/H5IMcc.c50
-rw-r--r--hl/src/H5IM.c18
-rw-r--r--hl/src/H5LT.c345
-rw-r--r--hl/src/H5PT.c4
-rw-r--r--hl/src/H5TB.c116
-rw-r--r--hl/src/Makefile.am2
-rw-r--r--hl/test/test_ds.c198
-rw-r--r--hl/test/test_lite.c2
-rw-r--r--hl/test/test_packet.c6
10 files changed, 329 insertions, 418 deletions
diff --git a/hl/examples/ex_ds1.c b/hl/examples/ex_ds1.c
index dc5efc9..8b7e530 100644
--- a/hl/examples/ex_ds1.c
+++ b/hl/examples/ex_ds1.c
@@ -67,11 +67,11 @@ int main(void)
*/
/* get the dataset id for DSET_NAME */
- if ((did = H5Dopen(fid,DSET_NAME))<0)
+ if ((did = H5Dopen2(fid,DSET_NAME, H5P_DEFAULT))<0)
goto out;
/* get the DS dataset id */
- if ((dsid = H5Dopen(fid,DS_1_NAME))<0)
+ if ((dsid = H5Dopen2(fid,DS_1_NAME, H5P_DEFAULT))<0)
goto out;
/* attach the DS_1_NAME dimension scale to DSET_NAME at dimension index 0 */
@@ -88,7 +88,7 @@ int main(void)
*/
/* get the DS dataset id */
- if ((dsid = H5Dopen(fid,DS_2_NAME))<0)
+ if ((dsid = H5Dopen2(fid,DS_2_NAME, H5P_DEFAULT))<0)
goto out;
/* attach the DS_2_NAME dimension scale to DSET_NAME as the 2nd dimension (index 1) */
diff --git a/hl/fortran/src/H5IMcc.c b/hl/fortran/src/H5IMcc.c
index dc1cfc1..0b0f75a 100644
--- a/hl/fortran/src/H5IMcc.c
+++ b/hl/fortran/src/H5IMcc.c
@@ -268,34 +268,36 @@ herr_t H5IMread_imagef( hid_t loc_id,
const char *dset_name,
int_f *buf )
{
- hid_t did;
+ hid_t did;
+ hid_t tid;
- /* open the dataset */
- if ( (did = H5Dopen( loc_id, dset_name )) < 0 )
- return -1;
+ /* open the dataset */
+ if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ return -1;
- /* read to memory type H5T_NATIVE_INT */
- if (sizeof(int_f) == sizeof(int)){
- if ( H5Dread( did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf ) < 0 )
- goto out;}
- else if (sizeof(int_f) == sizeof(long)) {
- if ( H5Dread( did, H5T_NATIVE_LONG, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf ) < 0 )
- goto out;}
- else if (sizeof(int_f) == sizeof(long_long)) {
- if ( H5Dread( did, H5T_NATIVE_LLONG, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf ) < 0 )
- goto out;}
- else
- goto out;
+ /* determine appropriate datatype to use */
+ if(sizeof(int_f) == sizeof(int))
+ tid = H5T_NATIVE_INT;
+ else if(sizeof(int_f) == sizeof(long))
+ tid = H5T_NATIVE_LONG;
+ else if(sizeof(int_f) == sizeof(long_long))
+ tid = H5T_NATIVE_LLONG;
+ else
+ goto out;
- /* close */
- if ( H5Dclose( did ) )
- return -1;
- return 0;
+ /* read to memory */
+ if(H5Dread(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
+ goto out;
-out:
- H5Dclose( did );
- return -1;
+ /* close */
+ if(H5Dclose(did))
+ return -1;
+ return 0;
+
+out:
+ H5Dclose(did);
+ return -1;
}
@@ -478,7 +480,7 @@ herr_t H5IM_get_palette( hid_t loc_id,
hid_t pal_id;
/* Open the dataset. */
- if((image_id = H5Dopen(loc_id, image_name)) < 0)
+ if((image_id = H5Dopen2(loc_id, image_name, H5P_DEFAULT)) < 0)
return -1;
/* Try to find the attribute "PALETTE" on the >>image<< dataset */
diff --git a/hl/src/H5IM.c b/hl/src/H5IM.c
index c7e905d..1405f8d 100644
--- a/hl/src/H5IM.c
+++ b/hl/src/H5IM.c
@@ -253,7 +253,7 @@ herr_t H5IMget_image_info( hid_t loc_id,
*npals = 0;
/* Open the dataset. */
- if((did = H5Dopen(loc_id, dset_name)) < 0)
+ if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
return -1;
/* Try to find the attribute "INTERLACE_MODE" on the >>image<< dataset */
@@ -407,7 +407,7 @@ herr_t H5IMread_image( hid_t loc_id,
hid_t did;
/* Open the dataset. */
- if ( (did = H5Dopen( loc_id, dset_name )) < 0)
+ if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
return -1;
/* Read */
@@ -527,7 +527,7 @@ herr_t H5IMlink_palette( hid_t loc_id,
*/
/* First we get the image id */
- if ( (image_id = H5Dopen( loc_id, image_name )) < 0)
+ if((image_id = H5Dopen2(loc_id, image_name, H5P_DEFAULT)) < 0)
return -1;
/* Try to find the attribute "PALETTE" on the >>image<< dataset */
@@ -694,7 +694,7 @@ herr_t H5IMunlink_palette( hid_t loc_id,
*/
/* First we get the image id */
- if ( (image_id = H5Dopen( loc_id, image_name )) < 0)
+ if((image_id = H5Dopen2(loc_id, image_name, H5P_DEFAULT)) < 0)
return -1;
/* Try to find the attribute "PALETTE" on the >>image<< dataset */
@@ -780,7 +780,7 @@ herr_t H5IMget_npalettes( hid_t loc_id,
*npals = 0;
/* Open the dataset. */
- if((image_id = H5Dopen(loc_id, image_name)) < 0)
+ if((image_id = H5Dopen2(loc_id, image_name, H5P_DEFAULT)) < 0)
return -1;
/* Try to find the attribute "PALETTE" on the >>image<< dataset */
@@ -873,7 +873,7 @@ herr_t H5IMget_palette_info( hid_t loc_id,
hsize_t pal_maxdims[2];
/* Open the dataset. */
- if((image_id = H5Dopen(loc_id, image_name)) < 0)
+ if((image_id = H5Dopen2(loc_id, image_name, H5P_DEFAULT)) < 0)
return -1;
/* Try to find the attribute "PALETTE" on the >>image<< dataset */
@@ -985,7 +985,7 @@ herr_t H5IMget_palette( hid_t loc_id,
hid_t pal_id;
/* Open the dataset. */
- if((image_id = H5Dopen(loc_id, image_name)) < 0)
+ if((image_id = H5Dopen2(loc_id, image_name, H5P_DEFAULT)) < 0)
return -1;
/* Try to find the attribute "PALETTE" on the >>image<< dataset */
@@ -1084,7 +1084,7 @@ herr_t H5IMis_image( hid_t loc_id,
ret = -1;
/* Open the dataset. */
- if ( (did = H5Dopen( loc_id, dset_name )) < 0)
+ if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
return -1;
/* Try to find the attribute "CLASS" on the dataset */
@@ -1169,7 +1169,7 @@ herr_t H5IMis_palette( hid_t loc_id,
ret = -1;
/* Open the dataset. */
- if ( (did = H5Dopen( loc_id, dset_name )) < 0)
+ if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
return -1;
/* Try to find the attribute "CLASS" on the dataset */
diff --git a/hl/src/H5LT.c b/hl/src/H5LT.c
index 865dfb2..a98d567 100644
--- a/hl/src/H5LT.c
+++ b/hl/src/H5LT.c
@@ -560,44 +560,63 @@ out:
/*-------------------------------------------------------------------------
- * Function: H5LTread_dataset
+ * Function: H5LT_read_dataset
*
* Purpose: Reads a dataset from disk.
*
* Return: Success: 0, Failure: -1
*
- * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ * Programmer: Quincey Koziol, koziol@hdfgroup.org
*
- * Date: June 13, 2001
+ * Date: October 8, 2007
*
*-------------------------------------------------------------------------
*/
-herr_t H5LTread_dataset( hid_t loc_id,
- const char *dset_name,
- hid_t tid,
- void *data )
+static herr_t
+H5LT_read_dataset(hid_t loc_id, const char *dset_name, hid_t tid, void *data)
{
- hid_t did;
+ hid_t did;
- /* Open the dataset. */
- if ( (did = H5Dopen( loc_id, dset_name )) < 0 )
- return -1;
+ /* Open the dataset. */
+ if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ return -1;
- /* Read */
- if ( H5Dread( did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, data ) < 0 )
- goto out;
+ /* Read */
+ if(H5Dread(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, data) < 0)
+ goto out;
- /* End access to the dataset and release resources used by it. */
- if ( H5Dclose( did ) )
- return -1;
+ /* End access to the dataset and release resources used by it. */
+ if(H5Dclose(did))
+ return -1;
- return 0;
+ return 0;
out:
- H5Dclose( did );
- return -1;
+ H5Dclose(did);
+ return -1;
+}
+/*-------------------------------------------------------------------------
+ * Function: H5LTread_dataset
+ *
+ * Purpose: Reads a dataset from disk.
+ *
+ * Return: Success: 0, Failure: -1
+ *
+ * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ *
+ * Date: June 13, 2001
+ *
+ *-------------------------------------------------------------------------
+ */
+
+herr_t H5LTread_dataset(hid_t loc_id,
+ const char *dset_name,
+ hid_t tid,
+ void *data)
+{
+ return(H5LT_read_dataset(loc_id, dset_name, tid, data));
}
@@ -619,26 +638,7 @@ herr_t H5LTread_dataset_char( hid_t loc_id,
const char *dset_name,
char *data )
{
- hid_t did;
-
- /* Open the dataset. */
- if ( (did = H5Dopen( loc_id, dset_name )) < 0 )
- return -1;
-
- /* Read */
- if ( H5Dread( did, H5T_NATIVE_CHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, data ) < 0 )
- goto out;
-
- /* End access to the dataset and release resources used by it. */
- if ( H5Dclose( did ) )
- return -1;
-
- return 0;
-
-out:
- H5Dclose( did );
- return -1;
-
+ return(H5LTread_dataset(loc_id, dset_name, H5T_NATIVE_CHAR, data));
}
/*-------------------------------------------------------------------------
@@ -659,26 +659,7 @@ herr_t H5LTread_dataset_short( hid_t loc_id,
const char *dset_name,
short *data )
{
- hid_t did;
-
- /* Open the dataset. */
- if ( (did = H5Dopen( loc_id, dset_name )) < 0 )
- return -1;
-
- /* Read */
- if ( H5Dread( did, H5T_NATIVE_SHORT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data ) < 0 )
- goto out;
-
- /* End access to the dataset and release resources used by it. */
- if ( H5Dclose( did ) )
- return -1;
-
- return 0;
-
-out:
- H5Dclose( did );
- return -1;
-
+ return(H5LTread_dataset(loc_id, dset_name, H5T_NATIVE_SHORT, data));
}
/*-------------------------------------------------------------------------
@@ -699,26 +680,7 @@ herr_t H5LTread_dataset_int( hid_t loc_id,
const char *dset_name,
int *data )
{
- hid_t did;
-
- /* Open the dataset. */
- if ( (did = H5Dopen( loc_id, dset_name )) < 0 )
- return -1;
-
- /* Read */
- if ( H5Dread( did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data ) < 0 )
- goto out;
-
- /* End access to the dataset and release resources used by it. */
- if ( H5Dclose( did ) )
- return -1;
-
- return 0;
-
-out:
- H5Dclose( did );
- return -1;
-
+ return(H5LTread_dataset(loc_id, dset_name, H5T_NATIVE_INT, data));
}
/*-------------------------------------------------------------------------
@@ -739,26 +701,7 @@ herr_t H5LTread_dataset_long( hid_t loc_id,
const char *dset_name,
long *data )
{
- hid_t did;
-
- /* Open the dataset. */
- if ( (did = H5Dopen( loc_id, dset_name )) < 0 )
- return -1;
-
- /* Read */
- if ( H5Dread( did, H5T_NATIVE_LONG, H5S_ALL, H5S_ALL, H5P_DEFAULT, data ) < 0 )
- goto out;
-
- /* End access to the dataset and release resources used by it. */
- if ( H5Dclose( did ) )
- return -1;
-
- return 0;
-
-out:
- H5Dclose( did );
- return -1;
-
+ return(H5LTread_dataset(loc_id, dset_name, H5T_NATIVE_LONG, data));
}
/*-------------------------------------------------------------------------
@@ -779,26 +722,7 @@ herr_t H5LTread_dataset_float( hid_t loc_id,
const char *dset_name,
float *data )
{
- hid_t did;
-
- /* Open the dataset. */
- if ( (did = H5Dopen( loc_id, dset_name )) < 0 )
- return -1;
-
- /* Read */
- if ( H5Dread( did, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data ) < 0 )
- goto out;
-
- /* End access to the dataset and release resources used by it. */
- if ( H5Dclose( did ) )
- return -1;
-
- return 0;
-
-out:
- H5Dclose( did );
- return -1;
-
+ return(H5LTread_dataset(loc_id, dset_name, H5T_NATIVE_FLOAT, data));
}
@@ -820,26 +744,7 @@ herr_t H5LTread_dataset_double( hid_t loc_id,
const char *dset_name,
double *data )
{
- hid_t did;
-
- /* Open the dataset. */
- if ( (did = H5Dopen( loc_id, dset_name )) < 0 )
- return -1;
-
- /* Read */
- if ( H5Dread( did, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, data ) < 0 )
- goto out;
-
- /* End access to the dataset and release resources used by it. */
- if ( H5Dclose( did ) )
- return -1;
-
- return 0;
-
-out:
- H5Dclose( did );
- return -1;
-
+ return(H5LTread_dataset(loc_id, dset_name, H5T_NATIVE_DOUBLE, data));
}
@@ -861,33 +766,34 @@ herr_t H5LTread_dataset_string( hid_t loc_id,
const char *dset_name,
char *buf )
{
- hid_t did;
- hid_t tid;
+ hid_t did = -1;
+ hid_t tid = -1;
- /* Open the dataset. */
- if ( (did = H5Dopen( loc_id, dset_name )) < 0 )
- return -1;
+ /* Open the dataset. */
+ if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ return -1;
- if ( (tid = H5Dget_type(did)) < 0 )
- goto out;
+ if((tid = H5Dget_type(did)) < 0)
+ goto out;
- /* Read */
- if ( H5Dread(did,tid,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf) < 0 )
- goto out;
+ /* Read */
+ if(H5Dread(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
+ goto out;
- /* close */
- if ( H5Dclose(did) )
- goto out;
- if ( H5Tclose(tid) )
- return -1;
+ /* close */
+ if(H5Dclose(did))
+ goto out;
+ if(H5Tclose(tid))
+ return -1;
- return 0;
+ return 0;
out:
- H5Dclose( did );
- H5Tclose( tid );
- return -1;
-
+ H5E_BEGIN_TRY {
+ H5Dclose(did);
+ H5Tclose(tid);
+ } H5E_END_TRY;
+ return -1;
}
@@ -909,36 +815,37 @@ herr_t H5LTget_dataset_ndims( hid_t loc_id,
const char *dset_name,
int *rank )
{
- hid_t did;
- hid_t sid;
+ hid_t did = -1;
+ hid_t sid = -1;
- /* Open the dataset. */
- if ( (did = H5Dopen( loc_id, dset_name )) < 0 )
- return -1;
+ /* Open the dataset. */
+ if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ return -1;
- /* Get the dataspace handle */
- if ( (sid = H5Dget_space( did )) < 0 )
- goto out;
+ /* Get the dataspace handle */
+ if((sid = H5Dget_space(did)) < 0)
+ goto out;
- /* Get rank */
- if ( (*rank = H5Sget_simple_extent_ndims( sid )) < 0 )
- goto out;
+ /* Get rank */
+ if((*rank = H5Sget_simple_extent_ndims(sid)) < 0)
+ goto out;
- /* Terminate access to the dataspace */
- if ( H5Sclose( sid ) < 0 )
- goto out;
+ /* Terminate access to the dataspace */
+ if(H5Sclose(sid) < 0)
+ goto out;
- /* End access to the dataset */
- if ( H5Dclose( did ) )
- return -1;
+ /* End access to the dataset */
+ if(H5Dclose(did))
+ return -1;
- return 0;
+ return 0;
out:
- H5Dclose( did );
- H5Sclose( sid );
- return -1;
-
+ H5E_BEGIN_TRY {
+ H5Dclose(did);
+ H5Sclose(sid);
+ } H5E_END_TRY;
+ return -1;
}
@@ -963,54 +870,56 @@ herr_t H5LTget_dataset_info( hid_t loc_id,
H5T_class_t *type_class,
size_t *type_size )
{
- hid_t did;
- hid_t tid;
- hid_t sid;
+ hid_t did = -1;
+ hid_t tid = -1;
+ hid_t sid = -1;
- /* open the dataset. */
- if ( (did = H5Dopen( loc_id, dset_name )) < 0 )
- return -1;
+ /* open the dataset. */
+ if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
+ return -1;
- /* get an identifier for the datatype. */
- tid = H5Dget_type( did );
+ /* get an identifier for the datatype. */
+ tid = H5Dget_type(did);
- /* get the class. */
- if (type_class!=NULL)
- *type_class = H5Tget_class( tid );
+ /* get the class. */
+ if(type_class != NULL)
+ *type_class = H5Tget_class(tid);
- /* get the size. */
- if (type_size!=NULL)
- *type_size = H5Tget_size( tid );
+ /* get the size. */
+ if(type_size!=NULL)
+ *type_size = H5Tget_size(tid);
- if (dims!=NULL)
- {
- /* get the dataspace handle */
- if ( (sid = H5Dget_space( did )) < 0 )
- goto out;
+ if(dims != NULL) {
+ /* get the dataspace handle */
+ if((sid = H5Dget_space(did)) < 0)
+ goto out;
- /* get dimensions */
- if ( H5Sget_simple_extent_dims( sid, dims, NULL) < 0 )
- goto out;
+ /* get dimensions */
+ if(H5Sget_simple_extent_dims(sid, dims, NULL) < 0)
+ goto out;
- /* terminate access to the dataspace */
- if ( H5Sclose( sid ) < 0 )
- goto out;
- }
+ /* terminate access to the dataspace */
+ if(H5Sclose(sid) < 0)
+ goto out;
+ } /* end if */
- /* release the datatype. */
- if ( H5Tclose( tid ) )
- return -1;
+ /* release the datatype. */
+ if(H5Tclose(tid))
+ return -1;
- /* end access to the dataset */
- if ( H5Dclose( did ) )
- return -1;
+ /* end access to the dataset */
+ if(H5Dclose(did))
+ return -1;
- return 0;
+ return 0;
out:
- H5Tclose( tid );
- H5Dclose( did );
- return -1;
+ H5E_BEGIN_TRY {
+ H5Tclose(tid);
+ H5Sclose(sid);
+ H5Dclose(did);
+ } H5E_END_TRY;
+ return -1;
}
diff --git a/hl/src/H5PT.c b/hl/src/H5PT.c
index a486f35..aedc7b5 100644
--- a/hl/src/H5PT.c
+++ b/hl/src/H5PT.c
@@ -232,10 +232,10 @@ hid_t H5PTopen( hid_t loc_id,
if((H5PT_ptable_id_type = H5Iregister_type((size_t)H5PT_HASH_TABLE_SIZE, 0, (H5I_free_t)free))<0)
goto out;
- table = (htbl_t *) malloc(sizeof(htbl_t));
+ table = (htbl_t *)malloc(sizeof(htbl_t));
/* Open the dataset */
- if(( table->dset_id = H5Dopen(loc_id, dset_name)) <0)
+ if((table->dset_id = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
goto out;
if (table->dset_id < 0)
goto out;
diff --git a/hl/src/H5TB.c b/hl/src/H5TB.c
index 9193bbd..9f4b161 100644
--- a/hl/src/H5TB.c
+++ b/hl/src/H5TB.c
@@ -208,7 +208,7 @@ herr_t H5TBmake_table( const char *table_title,
tmp_buf = fill_data;
/* Open the dataset. */
- if((did = H5Dopen( loc_id, dset_name )) < 0)
+ if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
return -1;
if (( sid = H5Screate(H5S_SCALAR)) < 0)
@@ -313,18 +313,18 @@ herr_t H5TBappend_records( hid_t loc_id,
return -1;
/* Open the dataset. */
- if((did = H5Dopen( loc_id, dset_name )) < 0)
+ if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
goto out;
/* Get the datatypes */
if((tid = H5Dget_type( did )) < 0)
goto out;
- if ((mem_type_id=H5TB_create_type(loc_id,dset_name,type_size,field_offset,field_sizes,tid))<0)
+ if ((mem_type_id=H5TB_create_type(loc_id,dset_name,type_size,field_offset,field_sizes,tid)) < 0)
goto out;
/* Append the records */
- if ((H5TB_common_append_records(did, mem_type_id, (size_t)nrecords, nrecords_orig, data))<0)
+ if ((H5TB_common_append_records(did, mem_type_id, (size_t)nrecords, nrecords_orig, data)) < 0)
goto out;
/* Release the datatype. */
@@ -396,14 +396,14 @@ herr_t H5TBwrite_records( hid_t loc_id,
hid_t mem_type_id=-1;
/* Open the dataset. */
- if((did = H5Dopen( loc_id, dset_name )) < 0)
+ if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
return -1;
/* Get the datatype */
if((tid = H5Dget_type( did )) < 0)
goto out;
- if ((mem_type_id=H5TB_create_type(loc_id,dset_name,type_size,field_offset,field_sizes,tid))<0)
+ if ((mem_type_id=H5TB_create_type(loc_id,dset_name,type_size,field_offset,field_sizes,tid)) < 0)
goto out;
/* Get the dataspace handle */
@@ -512,13 +512,13 @@ herr_t H5TBwrite_fields_name( hid_t loc_id,
size_t size_native;
/* Create xfer properties to preserve initialized data */
- if ((PRESERVE = H5Pcreate (H5P_DATASET_XFER))<0)
+ if ((PRESERVE = H5Pcreate (H5P_DATASET_XFER)) < 0)
return -1;
- if (H5Pset_preserve (PRESERVE, 1)<0)
+ if (H5Pset_preserve (PRESERVE, 1) < 0)
return -1;
/* Open the dataset. */
- if((did = H5Dopen( loc_id, dset_name )) < 0)
+ if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
goto out;
/* Get the datatype */
@@ -549,7 +549,7 @@ herr_t H5TBwrite_fields_name( hid_t loc_id,
goto out;
/* Convert to native type */
- if ((nmtype_id=H5Tget_native_type(member_type_id,H5T_DIR_DEFAULT))<0)
+ if ((nmtype_id=H5Tget_native_type(member_type_id,H5T_DIR_DEFAULT)) < 0)
goto out;
size_native=H5Tget_size(nmtype_id);
@@ -557,7 +557,7 @@ herr_t H5TBwrite_fields_name( hid_t loc_id,
/* Adjust, if necessary */
if (field_sizes[j]!=size_native)
{
- if (H5Tset_size(nmtype_id, field_sizes[j])<0)
+ if (H5Tset_size(nmtype_id, field_sizes[j]) < 0)
goto out;
}
@@ -683,13 +683,13 @@ herr_t H5TBwrite_fields_index( hid_t loc_id,
size_t size_native;
/* Create xfer properties to preserve initialized data */
- if ((PRESERVE = H5Pcreate (H5P_DATASET_XFER))<0)
+ if ((PRESERVE = H5Pcreate (H5P_DATASET_XFER)) < 0)
return -1;
- if (H5Pset_preserve (PRESERVE, 1)<0)
+ if (H5Pset_preserve (PRESERVE, 1) < 0)
return -1;
/* Open the dataset. */
- if((did = H5Dopen( loc_id, dset_name )) < 0)
+ if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
goto out;
/* Get the datatype */
@@ -714,14 +714,14 @@ herr_t H5TBwrite_fields_index( hid_t loc_id,
goto out;
/* Convert to native type */
- if ((nmtype_id=H5Tget_native_type(member_type_id,H5T_DIR_DEFAULT))<0)
+ if ((nmtype_id=H5Tget_native_type(member_type_id,H5T_DIR_DEFAULT)) < 0)
goto out;
size_native=H5Tget_size(nmtype_id);
if (field_sizes[i]!=size_native)
{
- if (H5Tset_size(nmtype_id, field_sizes[i])<0)
+ if (H5Tset_size(nmtype_id, field_sizes[i]) < 0)
goto out;
}
@@ -834,7 +834,7 @@ herr_t H5TBread_table( hid_t loc_id,
hsize_t dims[1];
/* open the dataset. */
- if ((did=H5Dopen(loc_id,dset_name))<0)
+ if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
return -1;
/* get the dataspace handle */
@@ -846,10 +846,10 @@ herr_t H5TBread_table( hid_t loc_id,
goto out;
/* get the datatypes */
- if ((ftype_id=H5Dget_type (did))<0)
+ if ((ftype_id=H5Dget_type (did)) < 0)
goto out;
- if ((mem_type_id=H5TB_create_type(loc_id,dset_name,type_size,field_offset,field_sizes,ftype_id))<0)
+ if ((mem_type_id=H5TB_create_type(loc_id,dset_name,type_size,field_offset,field_sizes,ftype_id)) < 0)
goto out;
/* read */
@@ -927,14 +927,14 @@ herr_t H5TBread_records( hid_t loc_id,
return -1;
/* open the dataset */
- if((did = H5Dopen( loc_id, dset_name )) < 0)
+ if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
return -1;
/* get the datatypes */
if((ftype_id = H5Dget_type( did )) < 0)
goto out;
- if ((mem_type_id=H5TB_create_type(loc_id,dset_name,type_size,field_offset,field_sizes,ftype_id))<0)
+ if ((mem_type_id=H5TB_create_type(loc_id,dset_name,type_size,field_offset,field_sizes,ftype_id)) < 0)
goto out;
/* Read the records */
@@ -1043,7 +1043,7 @@ herr_t H5TBread_fields_name( hid_t loc_id,
hssize_t i, j;
/* open the dataset */
- if((did = H5Dopen( loc_id, dset_name )) < 0)
+ if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
goto out;
/* get the datatype */
@@ -1071,14 +1071,14 @@ herr_t H5TBread_fields_name( hid_t loc_id,
goto out;
/* convert to native type */
- if ((nmtype_id=H5Tget_native_type(mtype_id,H5T_DIR_DEFAULT))<0)
+ if ((nmtype_id=H5Tget_native_type(mtype_id,H5T_DIR_DEFAULT)) < 0)
goto out;
size_native=H5Tget_size(nmtype_id);
if (field_sizes[j]!=size_native)
{
- if (H5Tset_size(nmtype_id, field_sizes[j])<0)
+ if (H5Tset_size(nmtype_id, field_sizes[j]) < 0)
goto out;
}
/* the field in the file is found by its name */
@@ -1198,7 +1198,7 @@ herr_t H5TBread_fields_index( hid_t loc_id,
hsize_t i, j;
/* Open the dataset. */
- if((did = H5Dopen( loc_id, dset_name )) < 0)
+ if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
goto out;
/* Get the datatype */
@@ -1226,14 +1226,14 @@ herr_t H5TBread_fields_index( hid_t loc_id,
goto out;
/* Convert to native type */
- if ((nmtype_id=H5Tget_native_type(member_type_id,H5T_DIR_DEFAULT))<0)
+ if ((nmtype_id=H5Tget_native_type(member_type_id,H5T_DIR_DEFAULT)) < 0)
goto out;
size_native=H5Tget_size(nmtype_id);
if (field_sizes[i]!=size_native)
{
- if (H5Tset_size(nmtype_id, field_sizes[i])<0)
+ if (H5Tset_size(nmtype_id, field_sizes[i]) < 0)
goto out;
}
@@ -1407,7 +1407,7 @@ herr_t H5TBdelete_record( hid_t loc_id,
*/
/* Open the dataset. */
- if((did = H5Dopen( loc_id, dset_name )) < 0)
+ if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
return -1;
/* Get the datatype */
@@ -1472,7 +1472,7 @@ herr_t H5TBdelete_record( hid_t loc_id,
nrows = ntotal_records - nrecords;
/* Set the attribute */
if (H5LT_set_attribute_numerical(loc_id,dset_name,"NROWS",(size_t)1,
- H5T_NATIVE_LLONG,&nrows)<0)
+ H5T_NATIVE_LLONG,&nrows) < 0)
return -1;
@@ -1538,7 +1538,7 @@ herr_t H5TBinsert_record( hid_t loc_id,
return -1;
/* Open the dataset. */
- if((did = H5Dopen( loc_id, dset_name )) < 0)
+ if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
goto out;
/* Get the datatype */
@@ -1546,7 +1546,7 @@ herr_t H5TBinsert_record( hid_t loc_id,
goto out;
/* Create the memory data type. */
- if ((mem_type_id=H5TB_create_type(loc_id,dset_name,type_size,field_offset,field_sizes,tid))<0)
+ if ((mem_type_id=H5TB_create_type(loc_id,dset_name,type_size,field_offset,field_sizes,tid)) < 0)
goto out;
read_nrecords = ntotal_records - start;
@@ -1719,7 +1719,7 @@ herr_t H5TBadd_records_from( hid_t loc_id,
*/
/* Open the 1st dataset. */
- if((dataset_id1 = H5Dopen( loc_id, dset_name1 )) < 0)
+ if((dataset_id1 = H5Dopen2(loc_id, dset_name1, H5P_DEFAULT)) < 0)
return -1;
/* Get the datatype */
@@ -1890,7 +1890,7 @@ herr_t H5TBcombine_tables( hid_t loc_id1,
*/
/* Open the 1st dataset. */
- if((dataset_id1 = H5Dopen( loc_id1, dset_name1 )) < 0)
+ if((dataset_id1 = H5Dopen2(loc_id1, dset_name1, H5P_DEFAULT)) < 0)
goto out;
/* Get the datatype */
@@ -2065,7 +2065,7 @@ herr_t H5TBcombine_tables( hid_t loc_id1,
*/
/* Open the dataset. */
- if((dataset_id2 = H5Dopen( loc_id2, dset_name2 )) < 0)
+ if((dataset_id2 = H5Dopen2(loc_id2, dset_name2, H5P_DEFAULT)) < 0)
goto out;
/* Get the datatype */
@@ -2255,7 +2255,7 @@ herr_t H5TBinsert_field( hid_t loc_id,
*/
/* Open the dataset. */
- if((dataset_id1 = H5Dopen( loc_id, dset_name )) < 0)
+ if((dataset_id1 = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
return -1;
/* Get creation properties list */
@@ -2430,9 +2430,9 @@ herr_t H5TBinsert_field( hid_t loc_id,
goto out;
/* Create xfer properties to preserve initialized data */
- if ((PRESERVE = H5Pcreate (H5P_DATASET_XFER))<0)
+ if ((PRESERVE = H5Pcreate (H5P_DATASET_XFER)) < 0)
goto out;
- if (H5Pset_preserve (PRESERVE, 1)<0)
+ if (H5Pset_preserve (PRESERVE, 1) < 0)
goto out;
/* Only write if there is something to write */
@@ -2529,7 +2529,7 @@ herr_t H5TBinsert_field( hid_t loc_id,
return -1;
/* Open the dataset. */
- if((dataset_id1 = H5Dopen( loc_id, dset_name )) < 0)
+ if((dataset_id1 = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
return -1;
/* Get the datatype */
@@ -2702,7 +2702,7 @@ herr_t H5TBdelete_field( hid_t loc_id,
*/
/* Open the dataset. */
- if((dataset_id1 = H5Dopen( loc_id, dset_name )) < 0)
+ if((dataset_id1 = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
return -1;
/* Get creation properties list */
@@ -2914,9 +2914,9 @@ herr_t H5TBdelete_field( hid_t loc_id,
goto out;
/* Create xfer properties to preserve initialized data */
- if ((PRESERVE = H5Pcreate (H5P_DATASET_XFER))<0)
+ if ((PRESERVE = H5Pcreate (H5P_DATASET_XFER)) < 0)
goto out;
- if (H5Pset_preserve (PRESERVE, 1)<0)
+ if (H5Pset_preserve (PRESERVE, 1) < 0)
goto out;
/* Write */
@@ -3014,7 +3014,7 @@ herr_t H5TBdelete_field( hid_t loc_id,
return -1;
/* Open the dataset. */
- if((dataset_id1 = H5Dopen( loc_id, dset_name )) < 0)
+ if((dataset_id1 = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
return -1;
/* Get the datatype */
@@ -3246,7 +3246,7 @@ herr_t H5TBget_table_info ( hid_t loc_id,
hsize_t n[1];
/* Open the dataset. */
- if((did = H5Dopen( loc_id, dset_name )) < 0)
+ if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
return -1;
/* Get the datatype */
@@ -3275,7 +3275,7 @@ herr_t H5TBget_table_info ( hid_t loc_id,
if(has_attr == 1 )
{
/* Get the attribute */
- if(H5LTget_attribute(loc_id,dset_name,"NROWS",H5T_NATIVE_LLONG,n)<0)
+ if(H5LTget_attribute(loc_id,dset_name,"NROWS",H5T_NATIVE_LLONG,n) < 0)
return -1;
/**nrecords = *n;*/
@@ -3356,14 +3356,14 @@ herr_t H5TBget_field_info( hid_t loc_id,
hssize_t i;
/* Open the dataset. */
- if(( did = H5Dopen( loc_id, dset_name )) < 0)
+ if((did = H5Dopen2(loc_id, dset_name, H5P_DEFAULT)) < 0)
goto out;
/* Get the datatype */
if(( ftype_id = H5Dget_type( did )) < 0)
goto out;
- if ((native_type_id = H5Tget_native_type(ftype_id,H5T_DIR_DEFAULT))<0)
+ if ((native_type_id = H5Tget_native_type(ftype_id,H5T_DIR_DEFAULT)) < 0)
goto out;
/* Get the type size */
@@ -3388,7 +3388,7 @@ herr_t H5TBget_field_info( hid_t loc_id,
/* Get the member type */
if(( member_type_id = H5Tget_member_type( ftype_id,(unsigned) i )) < 0)
goto out;
- if ((nativem_type_id = H5Tget_native_type(member_type_id,H5T_DIR_DEFAULT))<0)
+ if ((nativem_type_id = H5Tget_native_type(member_type_id,H5T_DIR_DEFAULT)) < 0)
goto out;
/* Get the member size */
@@ -3582,7 +3582,7 @@ hid_t H5TB_create_type(hid_t loc_id,
unsigned i;
/* get the number of fields */
- if (H5TBget_table_info(loc_id,dset_name,&nfields,NULL)<0)
+ if (H5TBget_table_info(loc_id,dset_name,&nfields,NULL) < 0)
return -1;
if ((fnames=malloc(sizeof(char*)*(size_t)nfields))==NULL)
@@ -3597,31 +3597,31 @@ hid_t H5TB_create_type(hid_t loc_id,
}
/* get field info */
- if(H5TBget_field_info(loc_id,dset_name,fnames,NULL,NULL,NULL)<0)
+ if(H5TBget_field_info(loc_id,dset_name,fnames,NULL,NULL,NULL) < 0)
goto out;
/* create the memory data type */
- if ((mem_type_id=H5Tcreate(H5T_COMPOUND,type_size))<0)
+ if ((mem_type_id=H5Tcreate(H5T_COMPOUND,type_size)) < 0)
goto out;
/* get each field ID and adjust its size, if necessary */
for ( i=0; i<nfields; i++)
{
- if ((mtype_id=H5Tget_member_type(ftype_id,i))<0)
+ if ((mtype_id=H5Tget_member_type(ftype_id,i)) < 0)
goto out;
- if ((nmtype_id=H5Tget_native_type(mtype_id,H5T_DIR_DEFAULT))<0)
+ if ((nmtype_id=H5Tget_native_type(mtype_id,H5T_DIR_DEFAULT)) < 0)
goto out;
size_native=H5Tget_size(nmtype_id);
if (field_sizes[i]!=size_native)
{
- if (H5Tset_size(nmtype_id,field_sizes[i])<0)
+ if (H5Tset_size(nmtype_id,field_sizes[i]) < 0)
goto out;
}
if (H5Tinsert(mem_type_id,fnames[i],field_offset[i],nmtype_id) < 0)
goto out;
- if (H5Tclose(mtype_id)<0)
+ if (H5Tclose(mtype_id) < 0)
goto out;
- if (H5Tclose(nmtype_id)<0)
+ if (H5Tclose(nmtype_id) < 0)
goto out;
}
@@ -3706,11 +3706,11 @@ herr_t H5TB_common_append_records( hid_t dataset_id,
/* Define a hyperslab in the dataset */
offset[0] = orig_table_size;
count[0] = nrecords;
- if(H5Sselect_hyperslab( space_id, H5S_SELECT_SET, offset, NULL, count, NULL)<0)
+ if(H5Sselect_hyperslab( space_id, H5S_SELECT_SET, offset, NULL, count, NULL) < 0)
goto out;
/* Write the records */
- if(H5Dwrite( dataset_id, mem_type_id, mem_space_id, space_id, H5P_DEFAULT, data )<0)
+ if(H5Dwrite( dataset_id, mem_type_id, mem_space_id, space_id, H5P_DEFAULT, data ) < 0)
goto out;
/* Terminate access to the dataspace */
@@ -3781,7 +3781,7 @@ herr_t H5TB_common_read_records( hid_t dataset_id,
mem_size[0] = count[0];
if ((mem_space_id = H5Screate_simple( 1, mem_size, NULL )) < 0)
goto out;
- if ((H5Dread( dataset_id, mem_type_id, mem_space_id, space_id, H5P_DEFAULT, data))<0)
+ if ((H5Dread( dataset_id, mem_type_id, mem_space_id, space_id, H5P_DEFAULT, data)) < 0)
goto out;
/* Terminate access to the memory dataspace */
diff --git a/hl/src/Makefile.am b/hl/src/Makefile.am
index f7e1f8e..37bff7b 100644
--- a/hl/src/Makefile.am
+++ b/hl/src/Makefile.am
@@ -26,7 +26,7 @@ AM_CPPFLAGS=-I$(top_srcdir)/src
# This library is our main target.
lib_LTLIBRARIES=libhdf5_hl.la
-libhdf5_hl_la_SOURCES=H5LT.c H5TB.c H5IM.c H5DS.c H5PT.c H5LTparse.c H5LTanalyze.c
+libhdf5_hl_la_SOURCES=H5DS.c H5IM.c H5LT.c H5LTanalyze.c H5LTparse.c H5PT.c H5TB.c
# Public header files (to be installed)
include_HEADERS=hdf5_hl.h H5IMpublic.h H5LTpublic.h H5TBpublic.h H5DSpublic.h H5PTpublic.h
diff --git a/hl/test/test_ds.c b/hl/test/test_ds.c
index 43e9424..604da3a 100644
--- a/hl/test/test_ds.c
+++ b/hl/test/test_ds.c
@@ -200,7 +200,7 @@ static int test_simple(void)
TESTING2("attach scales");
/* get the dataset id for "dset_a" */
- if ((did = H5Dopen(fid,"dset_a"))<0)
+ if ((did = H5Dopen2(fid,"dset_a", H5P_DEFAULT))<0)
goto out;
/*-------------------------------------------------------------------------
@@ -209,7 +209,7 @@ static int test_simple(void)
*/
/* get the DS dataset id */
- if ((dsid = H5Dopen(fid,DS_1_NAME))<0)
+ if ((dsid = H5Dopen2(fid,DS_1_NAME, H5P_DEFAULT))<0)
goto out;
/* attach the DS_1_NAME dimension scale to "dset_a" at dimension 0 */
@@ -226,7 +226,7 @@ static int test_simple(void)
*/
/* get the DS dataset id */
- if ((dsid = H5Dopen(fid,DS_11_NAME))<0)
+ if ((dsid = H5Dopen2(fid,DS_11_NAME, H5P_DEFAULT))<0)
goto out;
/* attach the DS_11_NAME dimension scale to "dset_a" at dimension 0 */
@@ -243,7 +243,7 @@ static int test_simple(void)
*/
/* get the DS dataset id */
- if ((dsid = H5Dopen(fid,DS_2_NAME))<0)
+ if ((dsid = H5Dopen2(fid,DS_2_NAME, H5P_DEFAULT))<0)
goto out;
/* attach the "ds2" dimension scale to "dset_a" as the 2nd dimension */
@@ -260,7 +260,7 @@ static int test_simple(void)
*/
/* get the DS dataset id */
- if ((dsid = H5Dopen(fid,DS_21_NAME))<0)
+ if ((dsid = H5Dopen2(fid,DS_21_NAME, H5P_DEFAULT))<0)
goto out;
/* attach the DS_21_NAME dimension scale to "dset_a" as the 2nd dimension */
@@ -277,7 +277,7 @@ static int test_simple(void)
*/
/* get the DS dataset id */
- if ((dsid = H5Dopen(fid,DS_22_NAME))<0)
+ if ((dsid = H5Dopen2(fid,DS_22_NAME, H5P_DEFAULT))<0)
goto out;
/* attach the "ds22" dimension scale to "dset_a" as the 2nd dimension */
@@ -295,28 +295,28 @@ static int test_simple(void)
*-------------------------------------------------------------------------
*/
- if ((dsid = H5Dopen(fid,DS_1_NAME))<0)
+ if ((dsid = H5Dopen2(fid,DS_1_NAME, H5P_DEFAULT))<0)
goto out;
if (H5DSis_attached(did,dsid,DIM0)<=0)
goto out;
if (H5Dclose(dsid))
goto out;
- if ((dsid = H5Dopen(fid,DS_2_NAME))<0)
+ if ((dsid = H5Dopen2(fid,DS_2_NAME, H5P_DEFAULT))<0)
goto out;
if (H5DSis_attached(did,dsid,DIM1)<=0)
goto out;
if (H5Dclose(dsid))
goto out;
- if ((dsid = H5Dopen(fid,DS_21_NAME))<0)
+ if ((dsid = H5Dopen2(fid,DS_21_NAME, H5P_DEFAULT))<0)
goto out;
if (H5DSis_attached(did,dsid,DIM1)<=0)
goto out;
if (H5Dclose(dsid))
goto out;
- if ((dsid = H5Dopen(fid,DS_22_NAME))<0)
+ if ((dsid = H5Dopen2(fid,DS_22_NAME, H5P_DEFAULT))<0)
goto out;
if (H5DSis_attached(did,dsid,DIM1)<=0)
goto out;
@@ -345,7 +345,7 @@ static int test_simple(void)
*/
/* get the dataset id for "dset_a" */
- if ((did = H5Dopen(fid,"dset_a"))<0)
+ if ((did = H5Dopen2(fid,"dset_a", H5P_DEFAULT))<0)
goto out;
/* verify that "dset_a" has 1 dimension scale at DIM 0 */
@@ -383,9 +383,9 @@ static int test_simple(void)
*-------------------------------------------------------------------------
*/
- if ((did = H5Dopen(fid,"dset_b"))<0)
+ if ((did = H5Dopen2(fid,"dset_b", H5P_DEFAULT))<0)
goto out;
- if ((dsid = H5Dopen(fid,"ds_b_1"))<0)
+ if ((dsid = H5Dopen2(fid,"ds_b_1", H5P_DEFAULT))<0)
goto out;
if (H5DSattach_scale(did,dsid,0)<0)
goto out;
@@ -400,7 +400,7 @@ static int test_simple(void)
*/
/* get the dataset id for "dset_b" */
- if ((did = H5Dopen(fid,"dset_b"))<0)
+ if ((did = H5Dopen2(fid,"dset_b", H5P_DEFAULT))<0)
goto out;
/* verify that "dset_b" has 1 dimension scale at DIM 0 */
@@ -461,31 +461,31 @@ static int test_simple(void)
*-------------------------------------------------------------------------
*/
- if ((did = H5Dopen(fid,"dset_c"))<0)
+ if ((did = H5Dopen2(fid,"dset_c", H5P_DEFAULT))<0)
goto out;
- if ((dsid = H5Dopen(fid,"ds_c_1"))<0)
+ if ((dsid = H5Dopen2(fid,"ds_c_1", H5P_DEFAULT))<0)
goto out;
if (H5DSattach_scale(did,dsid,0)<0)
goto out;
if (H5Dclose(dsid)<0)
goto out;
- if ((dsid = H5Dopen(fid,"ds_c_2"))<0)
+ if ((dsid = H5Dopen2(fid,"ds_c_2", H5P_DEFAULT))<0)
goto out;
if (H5DSattach_scale(did,dsid,1)<0)
goto out;
if (H5Dclose(dsid)<0)
goto out;
- if ((dsid = H5Dopen(fid,"ds_c_21"))<0)
+ if ((dsid = H5Dopen2(fid,"ds_c_21", H5P_DEFAULT))<0)
goto out;
if (H5DSattach_scale(did,dsid,1)<0)
goto out;
if (H5Dclose(dsid)<0)
goto out;
- if ((dsid = H5Dopen(fid,"ds_c_22"))<0)
+ if ((dsid = H5Dopen2(fid,"ds_c_22", H5P_DEFAULT))<0)
goto out;
if (H5DSattach_scale(did,dsid,1)<0)
goto out;
@@ -500,7 +500,7 @@ static int test_simple(void)
*-------------------------------------------------------------------------
*/
- if ((did = H5Dopen(fid,"dset_c"))<0)
+ if ((did = H5Dopen2(fid,"dset_c", H5P_DEFAULT))<0)
goto out;
/* verify that "dset_c" has 1 dimension scale at DIM 0 */
if ((nscales = H5DSget_num_scales(did,0))<0)
@@ -521,11 +521,11 @@ static int test_simple(void)
*/
/* get the dataset id for "dset_c" */
- if ((did = H5Dopen(fid,"dset_c"))<0)
+ if ((did = H5Dopen2(fid,"dset_c", H5P_DEFAULT))<0)
goto out;
/* get the DS dataset id */
- if ((dsid = H5Dopen(fid,"ds_c_21"))<0)
+ if ((dsid = H5Dopen2(fid,"ds_c_21", H5P_DEFAULT))<0)
goto out;
/* detach the "ds_c_21" dimension scale to "dset_c" in DIM 1 */
@@ -545,7 +545,7 @@ static int test_simple(void)
*-------------------------------------------------------------------------
*/
- if ((did = H5Dopen(fid,"dset_c"))<0)
+ if ((did = H5Dopen2(fid,"dset_c", H5P_DEFAULT))<0)
goto out;
/* verify that "dset_c" has 2 dimension scales at DIM 1 */
if ((nscales = H5DSget_num_scales(did,1))<0)
@@ -561,11 +561,11 @@ static int test_simple(void)
*/
/* get the dataset id for "dset_c" */
- if ((did = H5Dopen(fid,"dset_c"))<0)
+ if ((did = H5Dopen2(fid,"dset_c", H5P_DEFAULT))<0)
goto out;
/* get the DS dataset id */
- if ((dsid = H5Dopen(fid,"ds_c_22"))<0)
+ if ((dsid = H5Dopen2(fid,"ds_c_22", H5P_DEFAULT))<0)
goto out;
/* detach the "ds_c_22" dimension scale to "dset_c" in DIM 1 */
@@ -585,7 +585,7 @@ static int test_simple(void)
*-------------------------------------------------------------------------
*/
- if ((did = H5Dopen(fid,"dset_c"))<0)
+ if ((did = H5Dopen2(fid,"dset_c", H5P_DEFAULT))<0)
goto out;
/* verify that "dset_c" has 1 dimension scale at DIM 1 */
if ((nscales = H5DSget_num_scales(did,1))<0)
@@ -601,11 +601,11 @@ static int test_simple(void)
*/
/* get the dataset id for "dset_c" */
- if ((did = H5Dopen(fid,"dset_c"))<0)
+ if ((did = H5Dopen2(fid,"dset_c", H5P_DEFAULT))<0)
goto out;
/* get the DS dataset id */
- if ((dsid = H5Dopen(fid,"ds_c_2"))<0)
+ if ((dsid = H5Dopen2(fid,"ds_c_2", H5P_DEFAULT))<0)
goto out;
/* detach the "ds_c_2" dimension scale to "dset_c" in DIM 1 */
@@ -625,7 +625,7 @@ static int test_simple(void)
*-------------------------------------------------------------------------
*/
- if ((did = H5Dopen(fid,"dset_c"))<0)
+ if ((did = H5Dopen2(fid,"dset_c", H5P_DEFAULT))<0)
goto out;
/* verify that "dset_c" has 1 dimension scale at DIM 1 */
if ((nscales = H5DSget_num_scales(did,1))<0)
@@ -651,16 +651,16 @@ static int test_simple(void)
* attach them
*-------------------------------------------------------------------------
*/
- if ((did = H5Dopen(fid,"dset_d"))<0)
+ if ((did = H5Dopen2(fid,"dset_d", H5P_DEFAULT))<0)
goto out;
- if ((dsid = H5Dopen(fid,"ds_d_1"))<0)
+ if ((dsid = H5Dopen2(fid,"ds_d_1", H5P_DEFAULT))<0)
goto out;
if (H5DSattach_scale(did,dsid,0)<0)
goto out;
if (H5Dclose(dsid)<0)
goto out;
- if ((dsid = H5Dopen(fid,"ds_d_2"))<0)
+ if ((dsid = H5Dopen2(fid,"ds_d_2", H5P_DEFAULT))<0)
goto out;
if (H5DSattach_scale(did,dsid,1)<0)
goto out;
@@ -675,17 +675,17 @@ static int test_simple(void)
*-------------------------------------------------------------------------
*/
- if ((did = H5Dopen(fid,"dset_d"))<0)
+ if ((did = H5Dopen2(fid,"dset_d", H5P_DEFAULT))<0)
goto out;
- if ((dsid = H5Dopen(fid,"ds_d_1"))<0)
+ if ((dsid = H5Dopen2(fid,"ds_d_1", H5P_DEFAULT))<0)
goto out;
if (H5DSis_attached(did,dsid,DIM0)<=0)
goto out;
if (H5Dclose(dsid)<0)
goto out;
- if ((dsid = H5Dopen(fid,"ds_d_2"))<0)
+ if ((dsid = H5Dopen2(fid,"ds_d_2", H5P_DEFAULT))<0)
goto out;
if (H5DSis_attached(did,dsid,DIM1)<=0)
goto out;
@@ -702,11 +702,11 @@ static int test_simple(void)
*/
/* get the dataset id for "dset_d" */
- if ((did = H5Dopen(fid,"dset_d"))<0)
+ if ((did = H5Dopen2(fid,"dset_d", H5P_DEFAULT))<0)
goto out;
/* get the DS dataset id */
- if ((dsid = H5Dopen(fid,"ds_d_1"))<0)
+ if ((dsid = H5Dopen2(fid,"ds_d_1", H5P_DEFAULT))<0)
goto out;
/* detach the dimension scale to "dset_d" in DIM 0 */
@@ -731,11 +731,11 @@ static int test_simple(void)
*/
/* get the dataset id for "dset_d" */
- if ((did = H5Dopen(fid,"dset_d"))<0)
+ if ((did = H5Dopen2(fid,"dset_d", H5P_DEFAULT))<0)
goto out;
/* get the DS dataset id */
- if ((dsid = H5Dopen(fid,"ds_d_1"))<0)
+ if ((dsid = H5Dopen2(fid,"ds_d_1", H5P_DEFAULT))<0)
goto out;
/* attach "ds_d_1" again in DIM 0 */
@@ -766,11 +766,11 @@ static int test_simple(void)
*/
/* get the dataset id for "dset_d" */
- if ((did = H5Dopen(fid,"dset_d"))<0)
+ if ((did = H5Dopen2(fid,"dset_d", H5P_DEFAULT))<0)
goto out;
/* get the DS dataset id */
- if ((dsid = H5Dopen(fid,"ds_d_2"))<0)
+ if ((dsid = H5Dopen2(fid,"ds_d_2", H5P_DEFAULT))<0)
goto out;
/* detach the "ds_d_2" dimension scale to "dset_d" in DIM 1 */
@@ -805,11 +805,11 @@ static int test_simple(void)
*/
/* get the dataset id for "dset_d" */
- if ((did = H5Dopen(fid,"dset_d"))<0)
+ if ((did = H5Dopen2(fid,"dset_d", H5P_DEFAULT))<0)
goto out;
/* get the DS dataset id */
- if ((dsid = H5Dopen(fid,"ds_d_2"))<0)
+ if ((dsid = H5Dopen2(fid,"ds_d_2", H5P_DEFAULT))<0)
goto out;
/* attach "ds_d_2" in DIM 1 */
@@ -885,12 +885,12 @@ static int test_simple(void)
for (i=0; i<5; i++)
{
sprintf(dname,"dset_%d",i);
- if ((did = H5Dopen(gid,dname))<0)
+ if ((did = H5Dopen2(gid,dname, H5P_DEFAULT))<0)
goto out;
for (j=0; j<5; j++)
{
sprintf(sname,"ds_%d",j);
- if((dsid = H5Dopen(gid,sname))<0)
+ if((dsid = H5Dopen2(gid,sname, H5P_DEFAULT))<0)
goto out;
if(H5DSattach_scale(did,dsid,DIM0)<0)
goto out;
@@ -909,12 +909,12 @@ static int test_simple(void)
for (i=0; i<5; i++)
{
sprintf(dname,"dset_%d",i);
- if ((did = H5Dopen(gid,dname))<0)
+ if ((did = H5Dopen2(gid,dname, H5P_DEFAULT))<0)
goto out;
for (j=0; j<5; j++)
{
sprintf(sname,"ds_%d",j);
- if((dsid = H5Dopen(gid,sname))<0)
+ if((dsid = H5Dopen2(gid,sname, H5P_DEFAULT))<0)
goto out;
if(H5DSdetach_scale(did,dsid,DIM0)<0)
goto out;
@@ -934,12 +934,12 @@ static int test_simple(void)
for (i=0; i<5; i++)
{
sprintf(dname,"dset_%d",i);
- if ((did = H5Dopen(gid,dname))<0)
+ if ((did = H5Dopen2(gid,dname, H5P_DEFAULT))<0)
goto out;
for (j=0; j<5; j++)
{
sprintf(sname,"ds_%d",j);
- if((dsid = H5Dopen(gid,sname))<0)
+ if((dsid = H5Dopen2(gid,sname, H5P_DEFAULT))<0)
goto out;
if(H5DSattach_scale(did,dsid,DIM0)<0)
goto out;
@@ -976,9 +976,9 @@ static int test_simple(void)
goto out;
/* attach the DS to dimension 1 */
- if ((did = H5Dopen(fid,"dset_e"))<0)
+ if ((did = H5Dopen2(fid,"dset_e", H5P_DEFAULT))<0)
goto out;
- if ((dsid = H5Dopen(fid,"ds_e_1"))<0)
+ if ((dsid = H5Dopen2(fid,"ds_e_1", H5P_DEFAULT))<0)
goto out;
if (H5DSattach_scale(did,dsid,DIM1)<0)
goto out;
@@ -1016,7 +1016,7 @@ static int test_simple(void)
TESTING2("set/get label");
- if ((did = H5Dopen(fid,"dset_a"))<0)
+ if ((did = H5Dopen2(fid,"dset_a", H5P_DEFAULT))<0)
goto out;
/*-------------------------------------------------------------------------
@@ -1110,7 +1110,7 @@ static int test_simple(void)
*/
TESTING2("set scale/get scale name");
- if ((dsid = H5Dopen(fid,DS_1_NAME))<0)
+ if ((dsid = H5Dopen2(fid,DS_1_NAME, H5P_DEFAULT))<0)
goto out;
if (H5DSset_scale(dsid,SCALE_1_NAME)<0)
@@ -1179,28 +1179,28 @@ static int test_simple(void)
*-------------------------------------------------------------------------
*/
- if ((dsid = H5Dopen(fid,DS_11_NAME))<0)
+ if ((dsid = H5Dopen2(fid,DS_11_NAME, H5P_DEFAULT))<0)
goto out;
if (H5DSset_scale(dsid,SCALE_11_NAME)<0)
goto out;
if (H5Dclose(dsid))
goto out;
- if ((dsid = H5Dopen(fid,DS_2_NAME))<0)
+ if ((dsid = H5Dopen2(fid,DS_2_NAME, H5P_DEFAULT))<0)
goto out;
if (H5DSset_scale(dsid,SCALE_2_NAME)<0)
goto out;
if (H5Dclose(dsid))
goto out;
- if ((dsid = H5Dopen(fid,DS_21_NAME))<0)
+ if ((dsid = H5Dopen2(fid,DS_21_NAME, H5P_DEFAULT))<0)
goto out;
if (H5DSset_scale(dsid,SCALE_21_NAME)<0)
goto out;
if (H5Dclose(dsid))
goto out;
- if ((dsid = H5Dopen(fid,DS_22_NAME))<0)
+ if ((dsid = H5Dopen2(fid,DS_22_NAME, H5P_DEFAULT))<0)
goto out;
if (H5DSset_scale(dsid,SCALE_22_NAME)<0)
goto out;
@@ -1217,7 +1217,7 @@ static int test_simple(void)
TESTING2("iterate scales (verify scale)");
/* get the dataset id for "dset_a" */
- if ((did = H5Dopen(fid,"dset_a"))<0)
+ if ((did = H5Dopen2(fid,"dset_a", H5P_DEFAULT))<0)
goto out;
dim = 0;
@@ -1249,7 +1249,7 @@ static int test_simple(void)
/* get the dataset id for "dset_a" */
- if ((did = H5Dopen(fid,"dset_a"))<0)
+ if ((did = H5Dopen2(fid,"dset_a", H5P_DEFAULT))<0)
goto out;
dim = 0;
@@ -1279,7 +1279,7 @@ static int test_simple(void)
TESTING2("iterate scales (verify the scale sizes match)");
/* get the dataset id for "dset_a" */
- if ((did = H5Dopen(fid,"dset_a"))<0)
+ if ((did = H5Dopen2(fid,"dset_a", H5P_DEFAULT))<0)
goto out;
/* get dataset space */
@@ -1346,22 +1346,22 @@ static int test_simple(void)
* attach them
*-------------------------------------------------------------------------
*/
- if ((did = H5Dopen(fid,"dset_f"))<0)
+ if ((did = H5Dopen2(fid,"dset_f", H5P_DEFAULT))<0)
goto out;
- if ((dsid = H5Dopen(fid,"ds_f_1"))<0)
+ if ((dsid = H5Dopen2(fid,"ds_f_1", H5P_DEFAULT))<0)
goto out;
if (H5DSattach_scale(did,dsid,DIM0)<0)
goto out;
if (H5Dclose(dsid)<0)
goto out;
- if ((dsid = H5Dopen(fid,"ds_f_11"))<0)
+ if ((dsid = H5Dopen2(fid,"ds_f_11", H5P_DEFAULT))<0)
goto out;
if (H5DSattach_scale(did,dsid,DIM0)<0)
goto out;
if (H5Dclose(dsid)<0)
goto out;
- if ((dsid = H5Dopen(fid,"ds_f_2"))<0)
+ if ((dsid = H5Dopen2(fid,"ds_f_2", H5P_DEFAULT))<0)
goto out;
if (H5DSattach_scale(did,dsid,DIM1)<0)
goto out;
@@ -1376,7 +1376,7 @@ static int test_simple(void)
*-------------------------------------------------------------------------
*/
/* get the dataset id for "dset_f" */
- if ((did = H5Dopen(fid,"dset_f"))<0)
+ if ((did = H5Dopen2(fid,"dset_f", H5P_DEFAULT))<0)
goto out;
/* get dataset space */
@@ -1827,7 +1827,7 @@ static int test_errors(void)
goto out;
/* open the previous written "ds_a" */
- if ((did = H5Dopen(fid,"ds_a"))<0)
+ if ((did = H5Dopen2(fid,"ds_a", H5P_DEFAULT))<0)
goto out;
/* attach "ds_b" to "ds_a", valid */
@@ -1843,11 +1843,11 @@ static int test_errors(void)
goto out;
/* open the previous written "dset_a" */
- if ((did = H5Dopen(fid,"dset_a"))<0)
+ if ((did = H5Dopen2(fid,"dset_a", H5P_DEFAULT))<0)
goto out;
/* open the previous written "ds_a" */
- if ((dsid = H5Dopen(fid,"ds_a"))<0)
+ if ((dsid = H5Dopen2(fid,"ds_a", H5P_DEFAULT))<0)
goto out;
/* try to attach "ds_a" to "dset_a", not valid */
@@ -1861,11 +1861,11 @@ static int test_errors(void)
goto out;
/* open the previous written "ds_a" */
- if ((did = H5Dopen(fid,"ds_a"))<0)
+ if ((did = H5Dopen2(fid,"ds_a", H5P_DEFAULT))<0)
goto out;
/* open the previous written "ds_b" */
- if ((dsid = H5Dopen(fid,"ds_b"))<0)
+ if ((dsid = H5Dopen2(fid,"ds_b", H5P_DEFAULT))<0)
goto out;
/* detach "ds_b" to "ds_a" */
@@ -1888,11 +1888,11 @@ static int test_errors(void)
TESTING2("attach to a dataset that is a scale");
/* open the previous written "ds_b", that is a scale */
- if ((dsid = H5Dopen(fid,"ds_b"))<0)
+ if ((dsid = H5Dopen2(fid,"ds_b", H5P_DEFAULT))<0)
goto out;
/* open the previous written "ds_a" */
- if ((did = H5Dopen(fid,"ds_a"))<0)
+ if ((did = H5Dopen2(fid,"ds_a", H5P_DEFAULT))<0)
goto out;
/* try to attach "ds_a" to "ds_b", not valid */
@@ -1923,11 +1923,11 @@ static int test_errors(void)
goto out;
/* open the previous written "ds_b" */
- if ((dsid = H5Dopen(fid,"ds_b"))<0)
+ if ((dsid = H5Dopen2(fid,"ds_b", H5P_DEFAULT))<0)
goto out;
/* open the image dataset */
- if ((did = H5Dopen(fid,"image"))<0)
+ if ((did = H5Dopen2(fid,"image", H5P_DEFAULT))<0)
goto out;
/* try to attach "ds_a" to the image, not valid */
@@ -1950,7 +1950,7 @@ static int test_errors(void)
TESTING2("is scale");
/* open a non scale dataset */
- if ((did = H5Dopen(fid,"dset_a"))<0)
+ if ((did = H5Dopen2(fid,"dset_a", H5P_DEFAULT))<0)
goto out;
/* verify that it is not a dimension scale dataset */
@@ -1984,11 +1984,11 @@ static int test_errors(void)
TESTING2("detach scale from dataset it is not attached to");
/* open the previous written "ds_a" */
- if ((dsid = H5Dopen(fid,"ds_a"))<0)
+ if ((dsid = H5Dopen2(fid,"ds_a", H5P_DEFAULT))<0)
goto out;
/* open the previous written "dset_a" */
- if ((did = H5Dopen(fid,"dset_a"))<0)
+ if ((did = H5Dopen2(fid,"dset_a", H5P_DEFAULT))<0)
goto out;
/* try to detach "ds_a" from "dset_a" */
@@ -2012,7 +2012,7 @@ static int test_errors(void)
TESTING2("detach scale from group");
/* open the previous written "ds_a" */
- if ((dsid = H5Dopen(fid,"ds_a"))<0)
+ if ((dsid = H5Dopen2(fid,"ds_a", H5P_DEFAULT))<0)
goto out;
/* open the group. */
@@ -2040,7 +2040,7 @@ static int test_errors(void)
TESTING2("detach scale when scale is group");
/* open the previous written "dset_a" */
- if ((did = H5Dopen(fid,"dset_a"))<0)
+ if ((did = H5Dopen2(fid,"dset_a", H5P_DEFAULT))<0)
goto out;
/* open the group. */
@@ -2131,7 +2131,7 @@ static int test_iterators(void)
TESTING2("iterate when the dataset has no scales ");
/* get the dataset id for "dset_a" */
- if ((did = H5Dopen(fid,"dset_a"))<0)
+ if ((did = H5Dopen2(fid,"dset_a", H5P_DEFAULT))<0)
goto out;
/* try to iterate trough the 1st dimension of "dset_a", return error */
@@ -2153,7 +2153,7 @@ static int test_iterators(void)
TESTING2("iterate on dimension that is outside the rank ");
/* get the dataset id for "dset_a" */
- if ((did = H5Dopen(fid,"dset_a"))<0)
+ if ((did = H5Dopen2(fid,"dset_a", H5P_DEFAULT))<0)
goto out;
/* try to iterate trough the 3rd dimension of "dset_a", return error */
@@ -2174,7 +2174,7 @@ static int test_iterators(void)
TESTING2("iterate for dimension with many scales ");
/* open the previously written "dset_a" */
- if ((did = H5Dopen(fid,"dset_a"))<0)
+ if ((did = H5Dopen2(fid,"dset_a", H5P_DEFAULT))<0)
goto out;
for (i=0; i<100; i++)
@@ -2184,7 +2184,7 @@ static int test_iterators(void)
if (H5LTmake_dataset_int(fid,dname,rankds,s1_dim,NULL)<0)
goto out;
/* open */
- if ((dsid = H5Dopen(fid,dname))<0)
+ if ((dsid = H5Dopen2(fid,dname, H5P_DEFAULT))<0)
goto out;
/* attach */
if(H5DSattach_scale(did,dsid,0)<0)
@@ -2237,7 +2237,7 @@ static int test_iterators(void)
goto out;
/* open the previously written "dset_a" */
- if((did = H5Dopen(fid, "dset_a")) < 0)
+ if((did = H5Dopen2(fid, "dset_a", H5P_DEFAULT)) < 0)
goto out;
/* iterate */
@@ -2325,13 +2325,13 @@ static int test_rank(void)
TESTING2("attach");
- if ((did = H5Dopen(fid,"dset_a"))<0)
+ if ((did = H5Dopen2(fid,"dset_a", H5P_DEFAULT))<0)
goto out;
for (i=0; i<3; i++)
{
sprintf(name,"ds_a_%d",i);
- if((dsid = H5Dopen(fid,name))<0)
+ if((dsid = H5Dopen2(fid,name, H5P_DEFAULT))<0)
goto out;
if(H5DSattach_scale(did,dsid,(unsigned)i)<0)
goto out;
@@ -2354,13 +2354,13 @@ static int test_rank(void)
TESTING2("detach");
- if ((did = H5Dopen(fid,"dset_a"))<0)
+ if ((did = H5Dopen2(fid,"dset_a", H5P_DEFAULT))<0)
goto out;
for (i=0; i<3; i++)
{
sprintf(name,"ds_a_%d",i);
- if((dsid = H5Dopen(fid,name))<0)
+ if((dsid = H5Dopen2(fid,name, H5P_DEFAULT))<0)
goto out;
if(H5DSdetach_scale(did,dsid,(unsigned)i)<0)
goto out;
@@ -2381,13 +2381,13 @@ static int test_rank(void)
TESTING2("attach, set, get names, labels");
- if ((did = H5Dopen(fid,"dset_a"))<0)
+ if ((did = H5Dopen2(fid,"dset_a", H5P_DEFAULT))<0)
goto out;
for (i=0; i<3; i++)
{
sprintf(name,"ds_a_%d",i);
- if((dsid = H5Dopen(fid,name))<0)
+ if((dsid = H5Dopen2(fid,name, H5P_DEFAULT))<0)
goto out;
if (H5DSset_scale(dsid,name)<0)
goto out;
@@ -2532,11 +2532,11 @@ static int test_types(void)
TESTING2("floating point and short scales");
/* get the dataset id for "dset_a" */
- if ((did = H5Dopen(fid,"dset_a"))<0)
+ if ((did = H5Dopen2(fid,"dset_a", H5P_DEFAULT))<0)
goto out;
/* get the DS dataset id */
- if ((dsid = H5Dopen(fid,DS_1_NAME))<0)
+ if ((dsid = H5Dopen2(fid,DS_1_NAME, H5P_DEFAULT))<0)
goto out;
/* attach the DS_1_NAME dimension scale to "dset_a" at dimension 0 */
if (H5DSattach_scale(did,dsid,DIM0)<0)
@@ -2548,7 +2548,7 @@ static int test_types(void)
if (H5Dclose(dsid)<0)
goto out;
/* get the DS dataset id */
- if ((dsid = H5Dopen(fid,DS_2_NAME))<0)
+ if ((dsid = H5Dopen2(fid,DS_2_NAME, H5P_DEFAULT))<0)
goto out;
/* attach the DS_2_NAME dimension scale to "dset_a" at dimension 1 */
if (H5DSattach_scale(did,dsid,DIM1)<0)
@@ -2595,10 +2595,10 @@ static int test_types(void)
TESTING2("string scales");
/* get the dataset id for "dset_b" */
- if ((did = H5Dopen(fid,"dset_b"))<0)
+ if ((did = H5Dopen2(fid,"dset_b", H5P_DEFAULT))<0)
goto out;
/* get the DS dataset id */
- if ((dsid = H5Dopen(fid,"ds_b_1"))<0)
+ if ((dsid = H5Dopen2(fid,"ds_b_1", H5P_DEFAULT))<0)
goto out;
/* attach the DS_1_NAME dimension scale to "dset_b" at dimension 0 */
if (H5DSattach_scale(did,dsid,DIM0)<0)
@@ -2610,7 +2610,7 @@ static int test_types(void)
if (H5Dclose(dsid)<0)
goto out;
/* get the DS dataset id */
- if ((dsid = H5Dopen(fid,"ds_b_2"))<0)
+ if ((dsid = H5Dopen2(fid,"ds_b_2", H5P_DEFAULT))<0)
goto out;
/* attach the DS_2_NAME dimension scale to "dset_b" at dimension 1 */
if (H5DSattach_scale(did,dsid,DIM1)<0)
@@ -2744,11 +2744,11 @@ static int test_data(void)
*/
/* get the dataset id for "data" */
- if ((did = H5Dopen(fid,"data"))<0)
+ if ((did = H5Dopen2(fid,"data", H5P_DEFAULT))<0)
goto out;
/* get the DS dataset id */
- if ((dsid = H5Dopen(fid,"lat"))<0)
+ if ((dsid = H5Dopen2(fid,"lat", H5P_DEFAULT))<0)
goto out;
/* attach the DS_1_NAME dimension scale to "data" at dimension 0 */
if (H5DSattach_scale(did,dsid,DIM0)<0)
@@ -2760,7 +2760,7 @@ static int test_data(void)
if (H5Dclose(dsid)<0)
goto out;
/* get the DS dataset id */
- if ((dsid = H5Dopen(fid,"lon"))<0)
+ if ((dsid = H5Dopen2(fid,"lon", H5P_DEFAULT))<0)
goto out;
/* attach the DS_2_NAME dimension scale to "data" at dimension 1 */
if (H5DSattach_scale(did,dsid,DIM1)<0)
diff --git a/hl/test/test_lite.c b/hl/test/test_lite.c
index 61d9bca..a9b9f30 100644
--- a/hl/test/test_lite.c
+++ b/hl/test/test_lite.c
@@ -96,7 +96,7 @@ static int test_dsets( void )
/* Read dataset using the basic HDF5 API */
- if ( ( dataset_id = H5Dopen ( file_id, DSET0_NAME) ) < 0 )
+ if ( ( dataset_id = H5Dopen2(file_id, DSET0_NAME, H5P_DEFAULT) ) < 0 )
goto out;
if ( H5Dread ( dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data_int_out ) < 0 )
diff --git a/hl/test/test_packet.c b/hl/test/test_packet.c
index 466973c..0e025e0 100644
--- a/hl/test/test_packet.c
+++ b/hl/test/test_packet.c
@@ -823,7 +823,7 @@ test_compress(void)
/* Open the packet table as a regular dataset and make sure that the
* compression filter is set.
*/
- dset_id = H5Dopen(fid1, "Compressed Test Dataset");
+ dset_id = H5Dopen2(fid1, "Compressed Test Dataset", H5P_DEFAULT);
if( dset_id < 0) TEST_ERROR;
plist_id = H5Dget_create_plist(dset_id);
@@ -858,7 +858,7 @@ test_compress(void)
/* Open the packet table as a regular dataset and make sure that the
* compression filter is not set.
*/
- dset_id = H5Dopen(fid1, "Uncompressed Dataset");
+ dset_id = H5Dopen2(fid1, "Uncompressed Dataset", H5P_DEFAULT);
if( dset_id < 0) TEST_ERROR;
plist_id = H5Dget_create_plist(dset_id);
@@ -955,7 +955,7 @@ static int test_error(hid_t fid)
/* Open a high-level non-packet (H5TB) table and try to */
/* execute commands on it. */
- if((id=H5Dopen(fid, H5TB_TABLE_NAME)) <0)
+ if((id=H5Dopen2(fid, H5TB_TABLE_NAME, H5P_DEFAULT)) <0)
goto out;
id_open = 1;