summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2012-12-12 14:56:39 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2012-12-12 14:56:39 (GMT)
commit8dc9f39570e4368291f2016961a3658d2945b942 (patch)
tree46cae5ac2675fe39275e4d1b1fb16c8ca10b7af3 /examples
parente92f4b1a7c2c0f4f41dc9a4102584e0dfa3988a3 (diff)
downloadhdf5-8dc9f39570e4368291f2016961a3658d2945b942.zip
hdf5-8dc9f39570e4368291f2016961a3658d2945b942.tar.gz
hdf5-8dc9f39570e4368291f2016961a3658d2945b942.tar.bz2
[svn-r23093] Fixed API to be 1.6 compliant, removed deprecated APIs
Checked: jam (gnu, mpi) --disable-deprecated-symbols, --with-default-api-version=v16
Diffstat (limited to 'examples')
-rw-r--r--examples/h5_cmprss.c6
-rw-r--r--examples/h5_crtatt.c4
-rw-r--r--examples/h5_crtdat.c2
-rw-r--r--examples/h5_crtgrp.c2
-rw-r--r--examples/h5_crtgrpar.c6
-rw-r--r--examples/h5_crtgrpd.c6
-rw-r--r--examples/h5_extend.c6
-rw-r--r--examples/h5_rdwt.c2
-rw-r--r--examples/h5_subset.c4
9 files changed, 19 insertions, 19 deletions
diff --git a/examples/h5_cmprss.c b/examples/h5_cmprss.c
index efaf953..4a2f982 100644
--- a/examples/h5_cmprss.c
+++ b/examples/h5_cmprss.c
@@ -75,7 +75,7 @@ int main () {
status = H5Pset_szip (plist_id, szip_options_mask, szip_pixels_per_block);
*/
- dataset_id = H5Dcreate (file_id, "Compressed_Data", H5T_STD_I32BE,
+ dataset_id = H5Dcreate2 (file_id, "Compressed_Data", H5T_STD_I32BE,
dataspace_id, H5P_DEFAULT, plist_id, H5P_DEFAULT);
for (i = 0; i< DIM0; i++)
@@ -91,7 +91,7 @@ int main () {
/* Now reopen the file and dataset in the file. */
file_id = H5Fopen (FILE, H5F_ACC_RDWR, H5P_DEFAULT);
- dataset_id = H5Dopen (file_id, "Compressed_Data", H5P_DEFAULT);
+ dataset_id = H5Dopen2 (file_id, "Compressed_Data", H5P_DEFAULT);
/* Retrieve filter information. */
plist_id = H5Dget_create_plist (dataset_id);
@@ -101,7 +101,7 @@ int main () {
for (i=0; i<numfilt; i++) {
nelmts = 0;
- filter_type = H5Pget_filter (plist_id, 0, &flags, &nelmts, NULL, 0, NULL,
+ filter_type = H5Pget_filter2 (plist_id, 0, &flags, &nelmts, NULL, 0, NULL,
&filter_info);
printf ("Filter Type: ");
switch (filter_type) {
diff --git a/examples/h5_crtatt.c b/examples/h5_crtatt.c
index 17b61cb..416839f 100644
--- a/examples/h5_crtatt.c
+++ b/examples/h5_crtatt.c
@@ -36,14 +36,14 @@ int main() {
file_id = H5Fopen(FILE, H5F_ACC_RDWR, H5P_DEFAULT);
/* Open an existing dataset. */
- dataset_id = H5Dopen(file_id, "/dset", H5P_DEFAULT);
+ dataset_id = H5Dopen2(file_id, "/dset", H5P_DEFAULT);
/* Create the data space for the attribute. */
dims = 2;
dataspace_id = H5Screate_simple(1, &dims, NULL);
/* Create a dataset attribute. */
- attribute_id = H5Acreate (dataset_id, "Units", H5T_STD_I32BE, dataspace_id,
+ attribute_id = H5Acreate2 (dataset_id, "Units", H5T_STD_I32BE, dataspace_id,
H5P_DEFAULT, H5P_DEFAULT);
/* Write the attribute data. */
diff --git a/examples/h5_crtdat.c b/examples/h5_crtdat.c
index 4dbc7a1..bbb29b2 100644
--- a/examples/h5_crtdat.c
+++ b/examples/h5_crtdat.c
@@ -36,7 +36,7 @@ int main() {
dataspace_id = H5Screate_simple(2, dims, NULL);
/* Create the dataset. */
- dataset_id = H5Dcreate(file_id, "/dset", H5T_STD_I32BE, dataspace_id,
+ dataset_id = H5Dcreate2(file_id, "/dset", H5T_STD_I32BE, dataspace_id,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/* End access to the dataset and release resources used by it. */
diff --git a/examples/h5_crtgrp.c b/examples/h5_crtgrp.c
index e81425d..3a94a8f 100644
--- a/examples/h5_crtgrp.c
+++ b/examples/h5_crtgrp.c
@@ -30,7 +30,7 @@ int main() {
file_id = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/* Create a group named "/MyGroup" in the file. */
- group_id = H5Gcreate(file_id, "/MyGroup", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ group_id = H5Gcreate2(file_id, "/MyGroup", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/* Close the group. */
status = H5Gclose(group_id);
diff --git a/examples/h5_crtgrpar.c b/examples/h5_crtgrpar.c
index bc532f8..9e6fc40 100644
--- a/examples/h5_crtgrpar.c
+++ b/examples/h5_crtgrpar.c
@@ -30,13 +30,13 @@ int main() {
file_id = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/* Create group "MyGroup" in the root group using absolute name. */
- group1_id = H5Gcreate(file_id, "/MyGroup", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ group1_id = H5Gcreate2(file_id, "/MyGroup", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/* Create group "Group_A" in group "MyGroup" using absolute name. */
- group2_id = H5Gcreate(file_id, "/MyGroup/Group_A", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ group2_id = H5Gcreate2(file_id, "/MyGroup/Group_A", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/* Create group "Group_B" in group "MyGroup" using relative name. */
- group3_id = H5Gcreate(group1_id, "Group_B", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ group3_id = H5Gcreate2(group1_id, "Group_B", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/* Close groups. */
status = H5Gclose(group1_id);
diff --git a/examples/h5_crtgrpd.c b/examples/h5_crtgrpd.c
index acf9115..9c45928 100644
--- a/examples/h5_crtgrpd.c
+++ b/examples/h5_crtgrpd.c
@@ -47,7 +47,7 @@ int main() {
dataspace_id = H5Screate_simple(2, dims, NULL);
/* Create a dataset in group "MyGroup". */
- dataset_id = H5Dcreate(file_id, "/MyGroup/dset1", H5T_STD_I32BE, dataspace_id,
+ dataset_id = H5Dcreate2(file_id, "/MyGroup/dset1", H5T_STD_I32BE, dataspace_id,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/* Write the first dataset. */
@@ -61,7 +61,7 @@ int main() {
status = H5Dclose(dataset_id);
/* Open an existing group of the specified file. */
- group_id = H5Gopen(file_id, "/MyGroup/Group_A", H5P_DEFAULT);
+ group_id = H5Gopen2(file_id, "/MyGroup/Group_A", H5P_DEFAULT);
/* Create the data space for the second dataset. */
dims[0] = 2;
@@ -69,7 +69,7 @@ int main() {
dataspace_id = H5Screate_simple(2, dims, NULL);
/* Create the second dataset in group "Group_A". */
- dataset_id = H5Dcreate(group_id, "dset2", H5T_STD_I32BE, dataspace_id,
+ dataset_id = H5Dcreate2(group_id, "dset2", H5T_STD_I32BE, dataspace_id,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/* Write the second dataset. */
diff --git a/examples/h5_extend.c b/examples/h5_extend.c
index 128c715..105e553 100644
--- a/examples/h5_extend.c
+++ b/examples/h5_extend.c
@@ -75,7 +75,7 @@ main (void)
/* Create a new dataset within the file using chunk
creation properties. */
- dataset = H5Dcreate (file, DATASETNAME, H5T_NATIVE_INT, dataspace,
+ dataset = H5Dcreate2 (file, DATASETNAME, H5T_NATIVE_INT, dataspace,
H5P_DEFAULT, prop, H5P_DEFAULT);
/* Write data to dataset */
@@ -85,7 +85,7 @@ main (void)
/* Extend the dataset. Dataset becomes 10 x 3 */
size[0] = dims[0]+ dimsext[0];
size[1] = dims[1];
- status = H5Dextend (dataset, size);
+ status = H5Dset_extent (dataset, size);
/* Select a hyperslab in extended portion of dataset */
filespace = H5Dget_space (dataset);
@@ -114,7 +114,7 @@ main (void)
********************************************/
file = H5Fopen (FILENAME, H5F_ACC_RDONLY, H5P_DEFAULT);
- dataset = H5Dopen (file, DATASETNAME, H5P_DEFAULT);
+ dataset = H5Dopen2 (file, DATASETNAME, H5P_DEFAULT);
filespace = H5Dget_space (dataset);
rank = H5Sget_simple_extent_ndims (filespace);
diff --git a/examples/h5_rdwt.c b/examples/h5_rdwt.c
index 2f9d649..d5444e0 100644
--- a/examples/h5_rdwt.c
+++ b/examples/h5_rdwt.c
@@ -36,7 +36,7 @@ int main() {
file_id = H5Fopen(FILE, H5F_ACC_RDWR, H5P_DEFAULT);
/* Open an existing dataset. */
- dataset_id = H5Dopen(file_id, "/dset", H5P_DEFAULT);
+ dataset_id = H5Dopen2(file_id, "/dset", H5P_DEFAULT);
/* Write the dataset. */
status = H5Dwrite(dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT,
diff --git a/examples/h5_subset.c b/examples/h5_subset.c
index eec0a2f..66872ea 100644
--- a/examples/h5_subset.c
+++ b/examples/h5_subset.c
@@ -63,7 +63,7 @@ main (void)
dims[1] = DIM1;
dataspace_id = H5Screate_simple (RANK, dims, NULL);
- dataset_id = H5Dcreate (file_id, DATASETNAME, H5T_STD_I32BE, dataspace_id,
+ dataset_id = H5Dcreate2 (file_id, DATASETNAME, H5T_STD_I32BE, dataspace_id,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -95,7 +95,7 @@ main (void)
*****************************************************/
file_id = H5Fopen (FILE, H5F_ACC_RDWR, H5P_DEFAULT);
- dataset_id = H5Dopen (file_id, DATASETNAME, H5P_DEFAULT);
+ dataset_id = H5Dopen2 (file_id, DATASETNAME, H5P_DEFAULT);
/* Specify size and shape of subset to write. */