summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>1998-02-25 19:13:49 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>1998-02-25 19:13:49 (GMT)
commitc543632ba5cd609d2e6303fa9cf55685568fa851 (patch)
tree375e501aa060248c9e71fb6e5630ec64a47229ab /examples
parentfaa3f5739e0b52d84d119791b6859fe610b76d37 (diff)
downloadhdf5-c543632ba5cd609d2e6303fa9cf55685568fa851.zip
hdf5-c543632ba5cd609d2e6303fa9cf55685568fa851.tar.gz
hdf5-c543632ba5cd609d2e6303fa9cf55685568fa851.tar.bz2
[svn-r297] Switched templates to "property lists" and changed API prefix from H5C to H5P
Diffstat (limited to 'examples')
-rw-r--r--examples/h5_chunk_read.c14
-rw-r--r--examples/h5_compound.c12
-rw-r--r--examples/h5_extend_write.c12
-rw-r--r--examples/h5_group.c14
-rw-r--r--examples/h5_read.c4
-rw-r--r--examples/h5_write.c6
6 files changed, 31 insertions, 31 deletions
diff --git a/examples/h5_chunk_read.c b/examples/h5_chunk_read.c
index 916383b..6668c5c 100644
--- a/examples/h5_chunk_read.c
+++ b/examples/h5_chunk_read.c
@@ -40,7 +40,7 @@ main ()
/*
* Open the file and the dataset.
*/
-file = H5Fopen(FILE, H5F_ACC_RDONLY, H5C_DEFAULT);
+file = H5Fopen(FILE, H5F_ACC_RDONLY, H5P_DEFAULT);
dataset = H5Dopen(file, DATASETNAME);
/*
@@ -60,12 +60,12 @@ cparms = H5Dget_create_parms(dataset); /* Get properties handle first. */
/*
* Check if dataset is chunked.
*/
- if (H5D_CHUNKED == H5Cget_layout(cparms)) {
+ if (H5D_CHUNKED == H5Pget_layout(cparms)) {
/*
* Get chunking information: rank and dimensions
*/
-rank_chunk = H5Cget_chunk(cparms, 2, chunk_dims);
+rank_chunk = H5Pget_chunk(cparms, 2, chunk_dims);
printf("chunk rank %d, dimensions %d x %d \n", rank_chunk,
chunk_dims[0], chunk_dims[1]);
}
@@ -79,7 +79,7 @@ memspace = H5Screate_simple(RANK,dims,NULL);
* Read dataset back and display.
*/
status = H5Dread(dataset, H5T_NATIVE_INT, memspace, filespace,
- H5C_DEFAULT, data_out);
+ H5P_DEFAULT, data_out);
printf("\n");
printf("Dataset: \n");
for (j = 0; j < dims[0]; j++) {
@@ -121,7 +121,7 @@ count[0] = 10;
count[1] = 1;
status = H5Sset_hyperslab(filespace, offset, count, NULL);
status = H5Dread(dataset, H5T_NATIVE_INT, memspace, filespace,
- H5C_DEFAULT, column);
+ H5P_DEFAULT, column);
printf("\n");
printf("Third column: \n");
for (i = 0; i < 10; i++) {
@@ -161,7 +161,7 @@ status = H5Sset_hyperslab(filespace, offset, count, NULL);
* Read chunk back and display.
*/
status = H5Dread(dataset, H5T_NATIVE_INT, memspace, filespace,
- H5C_DEFAULT, chunk_out);
+ H5P_DEFAULT, chunk_out);
printf("\n");
printf("Chunk: \n");
for (j = 0; j < chunk_dims[0]; j++) {
@@ -177,7 +177,7 @@ for (j = 0; j < chunk_dims[0]; j++) {
/*
* Close/release resources.
*/
-H5Cclose(cparms);
+H5Pclose(cparms);
H5Dclose(dataset);
H5Sclose(filespace);
H5Sclose(memspace);
diff --git a/examples/h5_compound.c b/examples/h5_compound.c
index 91061cf..1abd4c2 100644
--- a/examples/h5_compound.c
+++ b/examples/h5_compound.c
@@ -62,7 +62,7 @@ space = H5Screate_simple(RANK, dim, NULL);
/*
* Create the file.
*/
-file = H5Fcreate(FILE, H5F_ACC_TRUNC, H5C_DEFAULT, H5C_DEFAULT);
+file = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/*
* Create the memory data type.
@@ -75,12 +75,12 @@ status = H5Tinsert(s1_tid, "b_name", HPOFFSET(s1, b), H5T_NATIVE_FLOAT);
/*
* Create the dataset.
*/
-dataset = H5Dcreate(file, DATASETNAME, s1_tid, space, H5C_DEFAULT);
+dataset = H5Dcreate(file, DATASETNAME, s1_tid, space, H5P_DEFAULT);
/*
* Wtite data to the dataset;
*/
-status = H5Dwrite(dataset, s1_tid, H5S_ALL, H5S_ALL, H5C_DEFAULT, s1);
+status = H5Dwrite(dataset, s1_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, s1);
/*
* Release resources
@@ -93,7 +93,7 @@ H5Fclose(file);
/*
* Open the file and the dataset.
*/
-file = H5Fopen(FILE, H5F_ACC_RDONLY, H5C_DEFAULT);
+file = H5Fopen(FILE, H5F_ACC_RDONLY, H5P_DEFAULT);
dataset = H5Dopen(file, DATASETNAME);
@@ -109,7 +109,7 @@ status = H5Tinsert(s2_tid, "a_name", HPOFFSET(s2, a), H5T_NATIVE_INT);
* Read two fields c and a from s1 dataset. Fields iin the file
* are found by their names "c_name" and "a_name".
*/
-status = H5Dread(dataset, s2_tid, H5S_ALL, H5S_ALL, H5C_DEFAULT, s2);
+status = H5Dread(dataset, s2_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, s2);
/*
* Display the fields
@@ -134,7 +134,7 @@ status = H5Tinsert(s3_tid, "b_name", 0, H5T_NATIVE_FLOAT);
/*
* Read field b from s1 dataset. Field in the file is found by its name.
*/
-status = H5Dread(dataset, s3_tid, H5S_ALL, H5S_ALL, H5C_DEFAULT, s3);
+status = H5Dread(dataset, s3_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, s3);
/*
* Display the field
diff --git a/examples/h5_extend_write.c b/examples/h5_extend_write.c
index 1d0438b..2417cc0 100644
--- a/examples/h5_extend_write.c
+++ b/examples/h5_extend_write.c
@@ -49,13 +49,13 @@ dataspace = H5Screate_simple(RANK, dims, maxdims);
/*
* Create a new file. If file exists its contents will be overwritten.
*/
-file = H5Fcreate(FILE, H5F_ACC_TRUNC, H5C_DEFAULT, H5C_DEFAULT);
+file = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/*
* Modify dataset creation properties, i.e. enable chunking.
*/
-cparms = H5Ccreate (H5C_DATASET_CREATE);
-status = H5Cset_chunk( cparms, RANK, chunk_dims);
+cparms = H5Pcreate (H5P_DATASET_CREATE);
+status = H5Pset_chunk( cparms, RANK, chunk_dims);
/*
* Create a new dataset within the file using cparms
@@ -83,7 +83,7 @@ status = H5Sset_hyperslab(filespace, offset, dims1, NULL);
* Write the data to the hyperslab.
*/
status = H5Dwrite(dataset, H5T_NATIVE_INT, dataspace, filespace,
- H5C_DEFAULT, data1);
+ H5P_DEFAULT, data1);
/*
* Extend the dataset. Dataset becomes 10 x 3.
@@ -110,7 +110,7 @@ dataspace = H5Screate_simple(RANK, dims2, NULL);
* Write the data to the hyperslab.
*/
status = H5Dwrite(dataset, H5T_NATIVE_INT, dataspace, filespace,
- H5C_DEFAULT, data2);
+ H5P_DEFAULT, data2);
/*
* Extend the dataset. Dataset becomes 10 x 5.
@@ -137,7 +137,7 @@ dataspace = H5Screate_simple(RANK, dims3, NULL);
* Write the data to the hyperslab.
*/
status = H5Dwrite(dataset, H5T_NATIVE_INT, dataspace, filespace,
- H5C_DEFAULT, data3);
+ H5P_DEFAULT, data3);
/*
* Resulting dataset
diff --git a/examples/h5_group.c b/examples/h5_group.c
index 303ce99..9835bcf 100644
--- a/examples/h5_group.c
+++ b/examples/h5_group.c
@@ -23,7 +23,7 @@ main()
/*
* Create a file.
*/
-file = H5Fcreate(FILE, H5F_ACC_TRUNC, H5C_DEFAULT, H5C_DEFAULT);
+file = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/*
* Create two groups in a file.
@@ -43,21 +43,21 @@ dataspace = H5Screate_simple(1, size, NULL);
/*
* Create dataset "String" in the root group.
*/
-dataset = H5Dcreate(file, "String", H5T_NATIVE_CHAR, dataspace, H5C_DEFAULT);
+dataset = H5Dcreate(file, "String", H5T_NATIVE_CHAR, dataspace, H5P_DEFAULT);
H5Dclose(dataset);
/*
* Create dataset "String" in the /IntData group.
*/
dataset = H5Dcreate(file, "/IntData/String", H5T_NATIVE_CHAR, dataspace,
- H5C_DEFAULT);
+ H5P_DEFAULT);
H5Dclose(dataset);
/*
* Create dataset "String" in the /FloatData group.
*/
dataset = H5Dcreate(file, "/FloatData/String", H5T_NATIVE_CHAR, dataspace,
- H5C_DEFAULT);
+ H5P_DEFAULT);
H5Sclose(dataspace);
H5Dclose(dataset);
@@ -68,7 +68,7 @@ dims[0] = 2;
dims[1] = 3;
dataspace = H5Screate_simple(RANK, dims, NULL);
dataset = H5Dcreate(file, "/IntData/IntArray", H5T_NATIVE_INT, dataspace,
- H5C_DEFAULT);
+ H5P_DEFAULT);
H5Sclose(dataspace);
H5Dclose(dataset);
@@ -93,7 +93,7 @@ status = H5Gset (file, "/FloatData");
dims[0] = 5;
dims[1] = 10;
dataspace = H5Screate_simple(RANK, dims, NULL);
-dataset = H5Dcreate(file, "FloatArray", H5T_NATIVE_FLOAT, dataspace, H5C_DEFAULT);
+dataset = H5Dcreate(file, "FloatArray", H5T_NATIVE_FLOAT, dataspace, H5P_DEFAULT);
H5Sclose(dataspace);
H5Dclose(dataset);
@@ -101,7 +101,7 @@ dims[0] = 4;
dims[1] = 6;
dataspace = H5Screate_simple(RANK, dims, NULL);
dataset = H5Dcreate(file, "DoubleArray", H5T_NATIVE_DOUBLE, dataspace,
- H5C_DEFAULT);
+ H5P_DEFAULT);
H5Sclose(dataspace);
H5Dclose(dataset);
diff --git a/examples/h5_read.c b/examples/h5_read.c
index d95dbe2..8384af9 100644
--- a/examples/h5_read.c
+++ b/examples/h5_read.c
@@ -48,7 +48,7 @@ for (j = 0; j < NX; j++) {
/*
* Open the file and the dataset.
*/
-file = H5Fopen(FILE, H5F_ACC_RDONLY, H5C_DEFAULT);
+file = H5Fopen(FILE, H5F_ACC_RDONLY, H5P_DEFAULT);
dataset = H5Dopen(file, DATASETNAME);
/*
@@ -103,7 +103,7 @@ status = H5Sset_hyperslab(memspace, offset_out, count_out, NULL);
* memory and display.
*/
status = H5Dread(dataset, H5T_NATIVE_INT, memspace, dataspace,
- H5C_DEFAULT, data_out);
+ H5P_DEFAULT, data_out);
for (j = 0; j < NX; j++) {
for (i = 0; i < NY; i++) printf("%d ", data_out[j][i][0]);
printf("\n");
diff --git a/examples/h5_write.c b/examples/h5_write.c
index 088810d..98e321f 100644
--- a/examples/h5_write.c
+++ b/examples/h5_write.c
@@ -39,7 +39,7 @@ for (j = 0; j < NX; j++) {
* default file creation properties, and default file
* access properties.
*/
-file = H5Fcreate(FILE, H5F_ACC_TRUNC, H5C_DEFAULT, H5C_DEFAULT);
+file = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/*
* Describe the size of the array and create the data space for fixed
@@ -60,13 +60,13 @@ status = H5Tset_order(datatype, H5T_ORDER_LE);
* datatype and default dataset creation properties.
*/
dataset = H5Dcreate(file, DATASETNAME, datatype, dataspace,
- H5C_DEFAULT);
+ H5P_DEFAULT);
/*
* Write the data to the dataset using default transfer properties.
*/
status = H5Dwrite(dataset, H5T_NATIVE_INT32, H5S_ALL, H5S_ALL,
- H5C_DEFAULT, data);
+ H5P_DEFAULT, data);
/*
* Close/release resources.