summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/h5_chunk_read.c2
-rw-r--r--examples/h5_compound.c4
-rw-r--r--examples/h5_extend_write.c2
-rw-r--r--examples/h5_group.c2
-rw-r--r--examples/h5_read.c2
-rw-r--r--examples/h5_write.c4
6 files changed, 8 insertions, 8 deletions
diff --git a/examples/h5_chunk_read.c b/examples/h5_chunk_read.c
index 859e526..3460d9d 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, H5ACC_DEFAULT, H5C_DEFAULT);
+file = H5Fopen(FILE, H5F_ACC_RDONLY, H5C_DEFAULT);
dataset = H5Dopen(file, DATASETNAME);
/*
diff --git a/examples/h5_compound.c b/examples/h5_compound.c
index a5ad77b..05add7d 100644
--- a/examples/h5_compound.c
+++ b/examples/h5_compound.c
@@ -62,7 +62,7 @@ space = H5Pcreate_simple(RANK, dim, NULL);
/*
* Create the file.
*/
-file = H5Fcreate(FILE, H5ACC_OVERWRITE, H5C_DEFAULT, H5C_DEFAULT);
+file = H5Fcreate(FILE, H5F_ACC_TRUNC, H5C_DEFAULT, H5C_DEFAULT);
/*
* Create the memory data type.
@@ -93,7 +93,7 @@ H5Fclose(file);
/*
* Open the file and the dataset.
*/
-file = H5Fopen(FILE, H5ACC_DEFAULT, H5C_DEFAULT);
+file = H5Fopen(FILE, H5F_ACC_RDONLY, H5C_DEFAULT);
dataset = H5Dopen(file, DATASETNAME);
diff --git a/examples/h5_extend_write.c b/examples/h5_extend_write.c
index 75d3a07..69e18ad 100644
--- a/examples/h5_extend_write.c
+++ b/examples/h5_extend_write.c
@@ -49,7 +49,7 @@ dataspace = H5Pcreate_simple(RANK, dims, maxdims);
/*
* Create a new file. If file exists its contents will be overwritten.
*/
-file = H5Fcreate(FILE, H5ACC_OVERWRITE, H5C_DEFAULT, H5C_DEFAULT);
+file = H5Fcreate(FILE, H5F_ACC_TRUNC, H5C_DEFAULT, H5C_DEFAULT);
/*
* Modify dataset creation properties, i.e. enable chunking.
diff --git a/examples/h5_group.c b/examples/h5_group.c
index 7b2dbe9..0ff7945 100644
--- a/examples/h5_group.c
+++ b/examples/h5_group.c
@@ -23,7 +23,7 @@ main()
/*
* Create a file.
*/
-file = H5Fcreate(FILE, H5ACC_OVERWRITE, H5C_DEFAULT, H5C_DEFAULT);
+file = H5Fcreate(FILE, H5F_ACC_TRUNC, H5C_DEFAULT, H5C_DEFAULT);
/*
* Create two groups in a file.
diff --git a/examples/h5_read.c b/examples/h5_read.c
index 99e1801..a7813c0 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, H5ACC_DEFAULT, H5C_DEFAULT);
+file = H5Fopen(FILE, H5F_ACC_RDONLY, H5C_DEFAULT);
dataset = H5Dopen(file, DATASETNAME);
/*
diff --git a/examples/h5_write.c b/examples/h5_write.c
index 00ac680..5d631d3 100644
--- a/examples/h5_write.c
+++ b/examples/h5_write.c
@@ -35,11 +35,11 @@ for (j = 0; j < NX; j++) {
4 5 6 7 8 9 */
/*
- * Create a new file using H5ACC_OVERWRITE access,
+ * Create a new file using H5F_ACC_TRUNC access,
* default file creation properties, and default file
* access properties.
*/
-file = H5Fcreate(FILE, H5ACC_OVERWRITE, H5C_DEFAULT, H5C_DEFAULT);
+file = H5Fcreate(FILE, H5F_ACC_TRUNC, H5C_DEFAULT, H5C_DEFAULT);
/*
* Describe the size of the array and create the data space for fixed