summaryrefslogtreecommitdiffstats
path: root/test/gass_write.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2005-08-13 21:06:26 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2005-08-13 21:06:26 (GMT)
commitc7bf502798ed500d9637ff3dd23a83420afd5070 (patch)
treea29e4bc6023564b9db5b435e4646b2b667171da2 /test/gass_write.c
parent5ad5d1a6d1190bbc6ed064eaae7ca1d2e361cb0a (diff)
downloadhdf5-c7bf502798ed500d9637ff3dd23a83420afd5070.zip
hdf5-c7bf502798ed500d9637ff3dd23a83420afd5070.tar.gz
hdf5-c7bf502798ed500d9637ff3dd23a83420afd5070.tar.bz2
[svn-r11246] 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 'test/gass_write.c')
-rw-r--r--test/gass_write.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/test/gass_write.c b/test/gass_write.c
index 6017224..c5974a7 100644
--- a/test/gass_write.c
+++ b/test/gass_write.c
@@ -17,10 +17,10 @@
* Friday, August 6, 1999.
*
* Modifications: Saurabh Bagchi (Aug 17, 1999)
- * Modified to work with VFL (HDF51.3).
+ * Modified to work with VFL (HDF51.3).
*/
-/* Test the following functionality of the GASS driver.
+/* Test the following functionality of the GASS driver.
1. Open a remote file for write.
2. Create a new dataset within the file.
3. Create a local memory buffer to hold the data.
@@ -38,7 +38,7 @@ int main(void)
#ifdef hide
-/*#define URL "ftp://gass:gass12@which/tmp/gass/junk.w"*/
+/*#define URL "ftp://gass:gass12@which/tmp/gass/junk.w"*/
#define URL "http://paz.ncsa.uiuc.edu:8080/test/put/test/b.h5"
#define DATASETNAME "IntArray"
@@ -52,44 +52,44 @@ int main (void)
hid_t fapl =-1, file;
hid_t dataspace, datatype, dataset;
hsize_t dimsf[2];
-
+
herr_t status = 0;
int data[NX][NY]; /* data to write */
int i, j;
GASS_Info ginf;
-
- /*
- * 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
* 4 5 6 7 8 9
*/
-
+
/* Create access property list and set the driver to GASS */
fapl = H5Pcreate (H5P_FILE_ACCESS);
if (fapl < 0) {
printf (" H5Pcreate failed. \n");
return -1;
}
-
+
ginf.block_size = 0;
ginf.max_length =0;
/* ginf = GASS_INFO_NULL;*/
-
+
status = H5Pset_fapl_gass (fapl, ginf);
if (status < 0) {
printf ("H5Pset_fapl_gass failed. \n");
return -1;
}
-
+
/*
* Create a new file using H5F_ACC_TRUNC access,
* default file creation properties, and gass file
@@ -108,20 +108,20 @@ int main (void)
printf ("H5Fcreate failed. \n");
return -1;
}
-
+
/*
* 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);
if (dataspace < 0) {
printf ("H5Screate failed. \n");
return -1;
}
- /*
+ /*
* Define datatype for the data in the file.
* We will store little endian INT numbers.
*/
@@ -130,7 +130,7 @@ int main (void)
printf ("H5Tcopy failed. \n");
return -1;
}
-
+
status = H5Tset_order(datatype, H5T_ORDER_LE);
if (status < 0) {
printf ("H5Tset_order failed. \n");
@@ -166,14 +166,14 @@ int main (void)
H5Dclose(dataset);
H5Fclose(file);
H5Pclose(fapl);
-
+
return 0;
}
-#else
+#else
int main(void)
{
printf("Test skipped because writing depends on web server!\n");
return 0;
}
-#endif
+#endif
#endif