summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElena Pourmal <epourmal@hdfgroup.org>2001-06-05 18:00:37 (GMT)
committerElena Pourmal <epourmal@hdfgroup.org>2001-06-05 18:00:37 (GMT)
commite8ed850fa86f3854f7abf6958268469c163d4ff9 (patch)
tree349739135b958ead298c186c6092a6c283d0aa9a
parent5fcefe52a26e265ab426ecc692bcf1e5cf8adb3f (diff)
downloadhdf5-e8ed850fa86f3854f7abf6958268469c163d4ff9.zip
hdf5-e8ed850fa86f3854f7abf6958268469c163d4ff9.tar.gz
hdf5-e8ed850fa86f3854f7abf6958268469c163d4ff9.tar.bz2
[svn-r3959]
Purpose: Bug fix Description: All examples used "FILE" string in the #define preprocessor directive. That caused error on Windows platforms since FILE is a structure returned by fopen calls. Solution: Changed "FILE" to "H5FILE_NAME" Platforms tested: Linux (eirene)
-rw-r--r--examples/h5_attribute.c6
-rw-r--r--examples/h5_chunk_read.c4
-rw-r--r--examples/h5_compound.c6
-rw-r--r--examples/h5_extend_write.c4
-rw-r--r--examples/h5_group.c6
-rw-r--r--examples/h5_read.c4
-rw-r--r--examples/h5_reference.c6
-rw-r--r--examples/h5_select.c6
-rw-r--r--examples/h5_write.c4
9 files changed, 23 insertions, 23 deletions
diff --git a/examples/h5_attribute.c b/examples/h5_attribute.c
index 37da2bd..6070d81 100644
--- a/examples/h5_attribute.c
+++ b/examples/h5_attribute.c
@@ -14,7 +14,7 @@
#include "hdf5.h"
-#define FILE "Attributes.h5"
+#define H5FILE_NAME "Attributes.h5"
#define RANK 1 /* Rank and size of the dataset */
#define SIZE 7
@@ -67,7 +67,7 @@ main (void)
/*
* Create a file.
*/
- file = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ file = H5Fcreate(H5FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/*
* Create the dataspace for the dataset in the file.
@@ -155,7 +155,7 @@ main (void)
/*
* Reopen the file.
*/
- file = H5Fopen(FILE, H5F_ACC_RDONLY, H5P_DEFAULT);
+ file = H5Fopen(H5FILE_NAME, H5F_ACC_RDONLY, H5P_DEFAULT);
/*
* Open the dataset.
diff --git a/examples/h5_chunk_read.c b/examples/h5_chunk_read.c
index f495f7b..6b72101 100644
--- a/examples/h5_chunk_read.c
+++ b/examples/h5_chunk_read.c
@@ -5,7 +5,7 @@
#include "hdf5.h"
-#define FILE "SDSextendible.h5"
+#define H5FILE_NAME "SDSextendible.h5"
#define DATASETNAME "ExtendibleArray"
#define RANK 2
#define RANKC 1
@@ -39,7 +39,7 @@ main (void)
/*
* Open the file and the dataset.
*/
- file = H5Fopen(FILE, H5F_ACC_RDONLY, H5P_DEFAULT);
+ file = H5Fopen(H5FILE_NAME, H5F_ACC_RDONLY, H5P_DEFAULT);
dataset = H5Dopen(file, DATASETNAME);
/*
diff --git a/examples/h5_compound.c b/examples/h5_compound.c
index 4bb4ad1..f37b266 100644
--- a/examples/h5_compound.c
+++ b/examples/h5_compound.c
@@ -6,7 +6,7 @@
#include "hdf5.h"
-#define FILE "SDScompound.h5"
+#define H5FILE_NAME "SDScompound.h5"
#define DATASETNAME "ArrayOfStructures"
#define LENGTH 10
#define RANK 1
@@ -59,7 +59,7 @@ main(void)
/*
* Create the file.
*/
- file = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ file = H5Fcreate(H5FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/*
* Create the memory data type.
@@ -90,7 +90,7 @@ main(void)
/*
* Open the file and the dataset.
*/
- file = H5Fopen(FILE, H5F_ACC_RDONLY, H5P_DEFAULT);
+ file = H5Fopen(H5FILE_NAME, H5F_ACC_RDONLY, H5P_DEFAULT);
dataset = H5Dopen(file, DATASETNAME);
diff --git a/examples/h5_extend_write.c b/examples/h5_extend_write.c
index c6aa37c..4fd404c 100644
--- a/examples/h5_extend_write.c
+++ b/examples/h5_extend_write.c
@@ -7,7 +7,7 @@
#include "hdf5.h"
-#define FILE "SDSextendible.h5"
+#define H5FILE_NAME "SDSextendible.h5"
#define DATASETNAME "ExtendibleArray"
#define RANK 2
#define NX 10
@@ -52,7 +52,7 @@ main (void)
/*
* Create a new file. If file exists its contents will be overwritten.
*/
- file = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ file = H5Fcreate(H5FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/*
* Modify dataset creation properties, i.e. enable chunking.
diff --git a/examples/h5_group.c b/examples/h5_group.c
index e1181ba..f55262a 100644
--- a/examples/h5_group.c
+++ b/examples/h5_group.c
@@ -10,7 +10,7 @@
#include "hdf5.h"
-#define FILE "group.h5"
+#define H5FILE_NAME "group.h5"
#define RANK 2
herr_t file_info(hid_t loc_id, const char *name, void *opdata);
@@ -35,7 +35,7 @@ main(void)
/*
* Create a file.
*/
- file = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ file = H5Fcreate(H5FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/*
* Create a group in the file.
@@ -83,7 +83,7 @@ main(void)
/*
* Now reopen the file and group in the file.
*/
- file = H5Fopen(FILE, H5F_ACC_RDWR, H5P_DEFAULT);
+ file = H5Fopen(H5FILE_NAME, H5F_ACC_RDWR, H5P_DEFAULT);
grp = H5Gopen(file, "Data");
/*
diff --git a/examples/h5_read.c b/examples/h5_read.c
index 82f71a6..b96322b 100644
--- a/examples/h5_read.c
+++ b/examples/h5_read.c
@@ -7,7 +7,7 @@
#include "hdf5.h"
-#define FILE "SDS.h5"
+#define H5FILE_NAME "SDS.h5"
#define DATASETNAME "IntArray"
#define NX_SUB 3 /* hyperslab dimensions */
#define NY_SUB 4
@@ -51,7 +51,7 @@ main (void)
/*
* Open the file and the dataset.
*/
- file = H5Fopen(FILE, H5F_ACC_RDONLY, H5P_DEFAULT);
+ file = H5Fopen(H5FILE_NAME, H5F_ACC_RDONLY, H5P_DEFAULT);
dataset = H5Dopen(file, DATASETNAME);
/*
diff --git a/examples/h5_reference.c b/examples/h5_reference.c
index 4399bfc..8445bb6 100644
--- a/examples/h5_reference.c
+++ b/examples/h5_reference.c
@@ -12,7 +12,7 @@
#include "hdf5.h"
-#define FILE "refere.h5"
+#define H5FILE_NAME "refere.h5"
int
main(void) {
@@ -32,7 +32,7 @@ main(void) {
/*
* Create a file using default properties.
*/
- fid = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ fid = H5Fcreate(H5FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/*
* Create group "A" in the file.
@@ -91,7 +91,7 @@ main(void) {
/*
* Reopen the file.
*/
- fid = H5Fopen(FILE, H5F_ACC_RDWR, H5P_DEFAULT);
+ fid = H5Fopen(H5FILE_NAME, H5F_ACC_RDWR, H5P_DEFAULT);
/*
* Open and read dataset "R".
diff --git a/examples/h5_select.c b/examples/h5_select.c
index 315ad64..0ff9de1 100644
--- a/examples/h5_select.c
+++ b/examples/h5_select.c
@@ -11,7 +11,7 @@
#include "hdf5.h"
-#define FILE "Select.h5"
+#define H5FILE_NAME "Select.h5"
#define MSPACE1_RANK 1 /* Rank of the first dataset in memory */
#define MSPACE1_DIM 50 /* Dataset size in memory */
@@ -77,7 +77,7 @@ main (void)
/*
* Create a file.
*/
- file = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ file = H5Fcreate(H5FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/*
* Create property list for a dataset and set up fill values.
@@ -196,7 +196,7 @@ main (void)
/*
* Open the file.
*/
- file = H5Fopen(FILE, H5F_ACC_RDONLY, H5P_DEFAULT);
+ file = H5Fopen(H5FILE_NAME, H5F_ACC_RDONLY, H5P_DEFAULT);
/*
* Open the dataset.
diff --git a/examples/h5_write.c b/examples/h5_write.c
index df4c692..08ba544 100644
--- a/examples/h5_write.c
+++ b/examples/h5_write.c
@@ -5,7 +5,7 @@
#include "hdf5.h"
-#define FILE "SDS.h5"
+#define H5FILE_NAME "SDS.h5"
#define DATASETNAME "IntArray"
#define NX 5 /* dataset dimensions */
#define NY 6
@@ -41,7 +41,7 @@ main (void)
* default file creation properties, and default file
* access properties.
*/
- file = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ file = H5Fcreate(H5FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
/*
* Describe the size of the array and create the data space for fixed