summaryrefslogtreecommitdiffstats
path: root/test/chunk_info.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2008-09-16 15:52:51 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2008-09-16 15:52:51 (GMT)
commitbdd7d59902483885dd8b883f3b2393e77383e5e8 (patch)
treeaaf20ab132d057b95b3c016d50fc22b77719084b /test/chunk_info.c
parent8bc0d5ed9019a681e1ea20c24264415d01c1cf2a (diff)
downloadhdf5-bdd7d59902483885dd8b883f3b2393e77383e5e8.zip
hdf5-bdd7d59902483885dd8b883f3b2393e77383e5e8.tar.gz
hdf5-bdd7d59902483885dd8b883f3b2393e77383e5e8.tar.bz2
[svn-r15628] Description:
Remove trailing whitespace from C/C++ source files, with the following script: foreach f (*.[ch] *.cpp) sed 's/[[:blank:]]*$//' $f > sed.out && mv sed.out $f end Tested on: Mac OS X/32 10.5.5 (amazon) No need for h5committest, just whitespace changes...
Diffstat (limited to 'test/chunk_info.c')
-rw-r--r--test/chunk_info.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/test/chunk_info.c b/test/chunk_info.c
index 48db292..68bf774 100644
--- a/test/chunk_info.c
+++ b/test/chunk_info.c
@@ -34,17 +34,17 @@
int main( void )
{
-
+
hid_t fid; /* file ID */
hid_t did; /* dataset ID */
hid_t f_sid; /* file space ID */
hid_t m_sid; /* memory space ID */
hid_t pid; /* property list ID */
hsize_t start[2]; /* chunk location to start writing */
- hsize_t dims[2] = { 4, 4};
+ hsize_t dims[2] = { 4, 4};
hsize_t chunk_dims[2] = { 2, 2 };
- int chunk_data[2][2] = { {1, 1}, {1, 1} };
- int buf[4][4];
+ int chunk_data[2][2] = { {1, 1}, {1, 1} };
+ int buf[4][4];
int fillvalue = 0;
int i, j, ii, jj;
@@ -82,22 +82,22 @@ int main( void )
/* iterate in dim 0 */
for (j = 0; j < chunk_dims[0]; j++)
{
-
+
/* reset start in dim 1 */
start[1] = 0;
-
+
/* iterate in dim 1 */
for (i = 0; i < chunk_dims[1]; i++)
{
-
+
/* select file hyperslab to save a 2x2 chunk */
if (H5Sselect_hyperslab(f_sid, H5S_SELECT_SET, start, NULL, chunk_dims, NULL) < 0) TEST_ERROR;
-
+
/* write the data to the hyperslab. */
- if (H5Dwrite(did, H5T_NATIVE_INT, m_sid, f_sid, H5P_DEFAULT, chunk_data) < 0) TEST_ERROR;
-
- /* read back and display complete dataset 4x4 */
- if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) TEST_ERROR;
+ if (H5Dwrite(did, H5T_NATIVE_INT, m_sid, f_sid, H5P_DEFAULT, chunk_data) < 0) TEST_ERROR;
+
+ /* read back and display complete dataset 4x4 */
+ if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) TEST_ERROR;
#if defined (PRINT_DATA)
@@ -108,14 +108,14 @@ int main( void )
printf("\n");
}
#endif
-
-
+
+
/* increment start in dim 1 */
start[1] += 2;
-
-
+
+
}
-
+
/* increment start in dim 0 */
start[0] += 2;
}
@@ -134,7 +134,7 @@ int main( void )
if (H5Fclose(fid) < 0) TEST_ERROR
PASSED();
-
+
puts("All chunk info tests passed.");
return 0;