summaryrefslogtreecommitdiffstats
path: root/examples/h5_write.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2005-08-13 20:53:35 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2005-08-13 20:53:35 (GMT)
commit6b45f5172ccb4311e0be9ae15da3758abb6b0e67 (patch)
tree5a7a112fe7a8a98c6fecb45b513789d15962eb3d /examples/h5_write.c
parent6562465a2c2a58cfbc2f47bf60bb538f7a783933 (diff)
downloadhdf5-6b45f5172ccb4311e0be9ae15da3758abb6b0e67.zip
hdf5-6b45f5172ccb4311e0be9ae15da3758abb6b0e67.tar.gz
hdf5-6b45f5172ccb4311e0be9ae15da3758abb6b0e67.tar.bz2
[svn-r11245] Purpose:
Code cleanup Description: Trim trailing whitespace, which is making 'diff'ing the two branches difficult. Solution: Ran this script in each directory: foreach f (*.[ch] *.cpp) sed 's/[[:blank:]]*$//' $f > sed.out && mv sed.out $f end Platforms tested: FreeBSD 4.11 (sleipnir) Too minor to require h5committest
Diffstat (limited to 'examples/h5_write.c')
-rw-r--r--examples/h5_write.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/examples/h5_write.c b/examples/h5_write.c
index 8cc4b8f..c3a8d35 100644
--- a/examples/h5_write.c
+++ b/examples/h5_write.c
@@ -12,15 +12,15 @@
* access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/*
+/*
* This example writes data to the HDF5 file.
- * Data conversion is performed during write operation.
+ * Data conversion is performed during write operation.
*/
-
+
#include "hdf5.h"
#define H5FILE_NAME "SDS.h5"
-#define DATASETNAME "IntArray"
+#define DATASETNAME "IntArray"
#define NX 5 /* dataset dimensions */
#define NY 6
#define RANK 2
@@ -31,19 +31,19 @@ main (void)
hid_t file, dataset; /* file and dataset handles */
hid_t datatype, dataspace; /* handles */
hsize_t dimsf[2]; /* dataset dimensions */
- herr_t status;
+ herr_t status;
int data[NX][NY]; /* data to write */
int i, j;
- /*
- * Data and output buffer initialization.
+ /*
+ * Data and output buffer initialization.
*/
for (j = 0; j < NX; j++) {
for (i = 0; i < NY; i++)
data[j][i] = i + j;
- }
+ }
/*
- * 0 1 2 3 4 5
+ * 0 1 2 3 4 5
* 1 2 3 4 5 6
* 2 3 4 5 6 7
* 3 4 5 6 7 8
@@ -59,13 +59,13 @@ main (void)
/*
* Describe the size of the array and create the data space for fixed
- * size dataset.
+ * size dataset.
*/
dimsf[0] = NX;
dimsf[1] = NY;
- dataspace = H5Screate_simple(RANK, dimsf, NULL);
+ dataspace = H5Screate_simple(RANK, dimsf, NULL);
- /*
+ /*
* Define datatype for the data in the file.
* We will store little endian INT numbers.
*/
@@ -92,6 +92,6 @@ main (void)
H5Tclose(datatype);
H5Dclose(dataset);
H5Fclose(file);
-
+
return 0;
-}
+}