summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/b+tree.c8
-rw-r--r--test/big.c32
-rw-r--r--test/bittests.c50
-rw-r--r--test/blocktrack.c30
-rw-r--r--test/btree2.c162
-rw-r--r--test/cache.c1912
-rw-r--r--test/cmpd_dset.c48
-rw-r--r--test/createnoenc.c2
-rw-r--r--test/dangle.c32
-rw-r--r--test/dsets.c648
-rw-r--r--test/dt_arith.c404
-rw-r--r--test/dtransform.c108
-rw-r--r--test/dtypes.c204
-rw-r--r--test/enum.c56
-rw-r--r--test/err_compat.c46
-rw-r--r--test/error_test.c90
-rw-r--r--test/extend.c6
-rw-r--r--test/external.c20
-rw-r--r--test/fillval.c148
-rw-r--r--test/flush1.c2
-rw-r--r--test/flush2.c8
-rw-r--r--test/gen_deflate.c6
-rw-r--r--test/gen_filters.c10
-rw-r--r--test/gen_new_array.c6
-rw-r--r--test/gen_new_fill.c12
-rw-r--r--test/gen_new_mtime.c6
-rw-r--r--test/gen_new_super.c4
-rw-r--r--test/gen_nullspace.c16
-rw-r--r--test/gen_old_array.c6
-rw-r--r--test/gen_old_layout.c6
-rw-r--r--test/gen_old_mtime.c6
-rw-r--r--test/getname.c246
-rw-r--r--test/gheap.c16
-rw-r--r--test/h5test.c54
-rw-r--r--test/h5test.h12
-rw-r--r--test/hyperslab.c20
-rw-r--r--test/istore.c4
-rw-r--r--test/lheap.c2
-rw-r--r--test/links.c30
-rw-r--r--test/mount.c142
-rw-r--r--test/mtime.c18
-rw-r--r--test/ntypes.c414
-rw-r--r--test/ohdr.c10
-rw-r--r--test/pool.c4
-rwxr-xr-xtest/reserved.c24
-rw-r--r--test/set_extent.c16
-rw-r--r--test/sheap.c8
-rw-r--r--test/space_overflow.c6
-rw-r--r--test/stab.c10
-rw-r--r--test/tarray.c148
-rw-r--r--test/tattr.c84
-rw-r--r--test/tconfig.c4
-rw-r--r--test/testframe.c8
-rw-r--r--test/testhdf5.c2
-rw-r--r--test/testmeta.c60
-rw-r--r--test/tfile.c202
-rw-r--r--test/tgenprop.c112
-rw-r--r--test/th5s.c80
-rw-r--r--test/theap.c70
-rw-r--r--test/tid.c4
-rw-r--r--test/titerate.c106
-rw-r--r--test/tmeta.c4
-rw-r--r--test/tmisc.c202
-rw-r--r--test/trefer.c44
-rw-r--r--test/trefstr.c34
-rw-r--r--test/tselect.c438
-rw-r--r--test/tskiplist.c76
-rw-r--r--test/ttime.c36
-rw-r--r--test/ttsafe.c2
-rw-r--r--test/ttsafe_acreate.c2
-rw-r--r--test/ttsafe_cancel.c2
-rw-r--r--test/ttsafe_dcreate.c2
-rw-r--r--test/ttsafe_error.c18
-rw-r--r--test/ttst.c26
-rw-r--r--test/tunicode.c8
-rw-r--r--test/tvlstr.c78
-rw-r--r--test/tvltypes.c92
-rw-r--r--test/unlink.c42
-rw-r--r--test/vfd.c142
79 files changed, 3629 insertions, 3629 deletions
diff --git a/test/b+tree.c b/test/b+tree.c
index 39b174b..1c756b8 100644
--- a/test/b+tree.c
+++ b/test/b+tree.c
@@ -65,7 +65,7 @@ test_create(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0)
STACK_ERROR
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file)))
STACK_ERROR
@@ -123,7 +123,7 @@ test_insert_basic(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0)
STACK_ERROR
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file)))
STACK_ERROR
@@ -160,9 +160,9 @@ error:
*
* Purpose: Test the B+ tree code
*
- * Return: Success:
+ * Return: Success:
*
- * Failure:
+ * Failure:
*
* Programmer: Quincey Koziol
* Tuesday, April 19, 2005
diff --git a/test/big.c b/test/big.c
index 5f624b7..021b628 100644
--- a/test/big.c
+++ b/test/big.c
@@ -82,15 +82,15 @@ randll(hsize_t limit, int current_index)
for(i = 0; i < current_index; i++)
{
if((acc >= values_used[i]) && (acc < values_used[i]+WRT_SIZE))
- overlap = 1;
+ overlap = 1;
if((acc+WRT_SIZE >= values_used[i]) && (acc+WRT_SIZE < values_used[i]+WRT_SIZE))
- overlap = 1;
+ overlap = 1;
}
tries++;
}
values_used[current_index]=acc;
-
+
return acc;
}
@@ -118,7 +118,7 @@ is_sparse(void)
{
int fd;
h5_stat_t sb;
-
+
if ((fd=HDopen("x.h5", O_RDWR|O_TRUNC|O_CREAT, 0666))<0) return 0;
if (HDlseek(fd, (off_t)(1024*1024), SEEK_SET)!=1024*1024) return 0;
if (5!=HDwrite(fd, "hello", 5)) return 0;
@@ -188,7 +188,7 @@ enough_room(hid_t fapl)
ret_value=0;
HDunlink(name);
}
-
+
return ret_value;
}
@@ -226,7 +226,7 @@ writer (hid_t fapl, int wrt_n)
hid_t dcpl;
TESTING("large dataset write");
-
+
/*
* We might be on a machine that has 32-bit files, so create an HDF5 file
* which is a family of files. Each member of the family will be 1GB
@@ -235,15 +235,15 @@ writer (hid_t fapl, int wrt_n)
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) {
goto error;
}
-
+
/* Create simple data spaces according to the size specified above. */
if ((space1 = H5Screate_simple (4, size1, size1))<0 ||
(space2 = H5Screate_simple (1, size2, size2))<0) {
goto error;
}
-
+
/* Create the datasets */
-/*
+/*
* The fix below is provided for bug#921
* H5Dcreate with H5P_DEFAULT creation properties
* will create a set of solid 1GB files; test will crash if quotas are enforced
@@ -263,7 +263,7 @@ writer (hid_t fapl, int wrt_n)
(d2=H5Dcreate (file, "d2", H5T_NATIVE_INT, space2, dcpl))<0) {
goto error;
}
-
+
/* Write some things to them randomly */
hs_size[0] = WRT_SIZE;
@@ -279,7 +279,7 @@ writer (hid_t fapl, int wrt_n)
if (H5Dwrite (d2, H5T_NATIVE_INT, mem_space, space2,
H5P_DEFAULT, buf)<0) goto error;
}
-
+
if (H5Dclose (d1)<0) goto error;
if (H5Dclose (d2)<0) goto error;
if (H5Sclose (mem_space)<0) goto error;
@@ -437,11 +437,11 @@ usage(void)
/*-------------------------------------------------------------------------
* Function: main
*
- * Purpose:
+ * Purpose:
*
- * Return: Success:
+ * Return: Success:
*
- * Failure:
+ * Failure:
*
* Programmer: Robb Matzke
* Friday, April 10, 1998
@@ -462,7 +462,7 @@ main (int ac, char **av)
hsize_t family_size_def; /* default family file size */
double family_size_def_dbl; /* default family file size */
int cflag=1; /* check file system before test */
-
+
/* parameters setup */
family_size_def = FAMILY_SIZE;
@@ -544,7 +544,7 @@ main (int ac, char **av)
goto quit;
}
}
-
+
/* Do the test */
if (writer(fapl, WRT_N)) goto error;
if (reader(fapl)) goto error;
diff --git a/test/bittests.c b/test/bittests.c
index 872a01a..a44da2a 100644
--- a/test/bittests.c
+++ b/test/bittests.c
@@ -50,7 +50,7 @@ test_find (void)
uint8_t v1[8];
int i;
ssize_t n;
-
+
TESTING("bit search operations");
/* The zero length buffer */
@@ -67,7 +67,7 @@ test_find (void)
puts (" Zero length test failed (msb)!");
goto failed;
}
-
+
/* The zero buffer */
memset (v1, 0, sizeof v1);
@@ -101,7 +101,7 @@ test_find (void)
goto failed;
}
}
-
+
/* The one buffer */
memset (v1, 0xff, sizeof v1);
n = H5T_bit_find (v1, 0, 8*sizeof(v1), H5T_BIT_LSB, FALSE);
@@ -134,7 +134,7 @@ test_find (void)
goto failed;
}
}
-
+
PASSED();
return 0;
@@ -170,7 +170,7 @@ test_copy (void)
size_t s_offset, d_offset, size;
int i, j;
ssize_t n;
-
+
TESTING("bit copy operations");
for (i=0; i<NTESTS; i++) {
@@ -180,7 +180,7 @@ test_copy (void)
size = MIN3 (size, 8*sizeof(v1)-s_offset, 8*sizeof(v2)-d_offset);
memset (v1, 0xff, sizeof v1);
memset (v2, 0x00, sizeof v2);
-
+
/* Copy some bits to v2 and make sure something was copied */
H5T_bit_copy (v2, d_offset, v1, s_offset, size);
for (j=0; j<(int)sizeof(v2); j++) if (v2[j]) break;
@@ -194,7 +194,7 @@ test_copy (void)
puts (" Found copied bits when we shouldn't have");
goto failed;
}
-
+
/* Look for the zeros and ones */
n = H5T_bit_find (v2, 0, 8*sizeof(v2), H5T_BIT_LSB, 1);
@@ -292,7 +292,7 @@ test_shift (void)
size_t offset, size;
int i, j;
ssize_t shift_dist, n;
-
+
TESTING("bit shift operations");
for (i=0; i<NTESTS; i++) {
@@ -359,10 +359,10 @@ test_shift (void)
/*-------- Shift the bits out of sight --------*/
/* A sequence 111111 will be 000000 if shift_dist=6 */
- /* Randomly decide shift direction */
+ /* Randomly decide shift direction */
if(size % 2 == 0)
shift_dist = size;
- else
+ else
shift_dist = -((ssize_t)size);
memset (vector, 0x00, sizeof vector);
@@ -378,8 +378,8 @@ test_shift (void)
"(n=%d)\n", (int)n);
goto failed;
}
-
- /* Look from the other direction */
+
+ /* Look from the other direction */
n = H5T_bit_find (vector, 0, 8*sizeof(vector), H5T_BIT_MSB, 1);
if (n >= 0) {
H5_FAILED();
@@ -425,7 +425,7 @@ test_increment (void)
size_t offset, size;
int i, j;
ssize_t n;
-
+
TESTING("bit increment operations");
for (i=0; i<NTESTS; i++) {
@@ -512,7 +512,7 @@ test_decrement (void)
size_t offset, size;
int i, j;
ssize_t n;
-
+
TESTING("bit decrement operations");
for (i=0; i<NTESTS; i++) {
@@ -584,7 +584,7 @@ test_negate (void)
size_t offset, size;
int i, j;
ssize_t n;
-
+
TESTING("bit negate operations");
for (i=0; i<NTESTS; i++) {
@@ -595,7 +595,7 @@ test_negate (void)
/* All-zero sequence will become 111111(size=6) after negating */
memset (vector, 0x00, sizeof vector);
-
+
/* negate the sequence */
H5T_bit_neg (vector, offset, size);
@@ -684,7 +684,7 @@ test_set (void)
size_t d_offset, size;
int i, j;
ssize_t n;
-
+
TESTING("bit set operations");
for (i=0; i<NTESTS; i++) {
@@ -692,7 +692,7 @@ test_set (void)
size = (unsigned)HDrand() % (8*sizeof(v2));
size = MIN (size, 8*sizeof(v2)-d_offset);
memset (v2, 0x00, sizeof v2);
-
+
/* Set some bits in v2 */
H5T_bit_set (v2, d_offset, size, TRUE);
for (j=0; j<(int)sizeof(v2); j++) if (v2[j]) break;
@@ -706,7 +706,7 @@ test_set (void)
puts (" Found set bits when we shouldn't have");
goto failed;
}
-
+
/* Look for the zeros and ones */
n = H5T_bit_find (v2, 0, 8*sizeof(v2), H5T_BIT_LSB, 1);
@@ -801,7 +801,7 @@ test_clear (void)
size_t d_offset, size;
int i, j;
ssize_t n;
-
+
TESTING("bit clear operations");
for (i=0; i<NTESTS; i++) {
@@ -809,7 +809,7 @@ test_clear (void)
size = (unsigned)HDrand() % (8*sizeof(v2));
size = MIN (size, 8*sizeof(v2)-d_offset);
memset (v2, 0xff, sizeof v2);
-
+
/* Clear some bits in v2 */
H5T_bit_set (v2, d_offset, size, FALSE);
for (j=0; j<(int)sizeof(v2); j++) if (0xff!=v2[j]) break;
@@ -823,7 +823,7 @@ test_clear (void)
puts (" Found cleared bits when we shouldn't have");
goto failed;
}
-
+
/* Look for the zeros and ones */
n = H5T_bit_find (v2, 0, 8*sizeof(v2), H5T_BIT_LSB, 0);
@@ -898,11 +898,11 @@ test_clear (void)
/*-------------------------------------------------------------------------
* Function: main
*
- * Purpose:
+ * Purpose:
*
- * Return: Success:
+ * Return: Success:
*
- * Failure:
+ * Failure:
*
* Programmer: Robb Matzke
* Tuesday, June 16, 1998
diff --git a/test/blocktrack.c b/test/blocktrack.c
index aafb9dc..28d9c28 100644
--- a/test/blocktrack.c
+++ b/test/blocktrack.c
@@ -100,7 +100,7 @@ test_create(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -194,7 +194,7 @@ test_insert_one(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -294,7 +294,7 @@ test_insert_few(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -531,7 +531,7 @@ test_insert_many(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -628,7 +628,7 @@ test_insert_overlap(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -738,7 +738,7 @@ test_insert_merge(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -938,7 +938,7 @@ test_remove_whole(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -1217,7 +1217,7 @@ test_remove_partial_begin(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -1490,7 +1490,7 @@ test_locate(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -1605,7 +1605,7 @@ test_neighbor(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -1698,7 +1698,7 @@ test_iterate(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -1793,7 +1793,7 @@ test_delete(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -1829,7 +1829,7 @@ test_delete(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -1885,9 +1885,9 @@ error:
*
* Purpose: Test the block tracker code
*
- * Return: Success:
+ * Return: Success:
*
- * Failure:
+ * Failure:
*
* Programmer: Quincey Koziol
* Wednesday, March 9, 2005
diff --git a/test/btree2.c b/test/btree2.c
index 615251f..9ac6571 100644
--- a/test/btree2.c
+++ b/test/btree2.c
@@ -189,7 +189,7 @@ test_insert_basic(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -234,7 +234,7 @@ test_insert_basic(hid_t fapl)
if(ret != FAIL) TEST_ERROR;
/*
- * Test inserting record into v2 B-tree
+ * Test inserting record into v2 B-tree
*/
TESTING("B-tree insert: several records");
record=42;
@@ -387,7 +387,7 @@ test_insert_split_root(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -404,7 +404,7 @@ test_insert_split_root(hid_t fapl)
}
/*
- * Test inserting many records into v2 B-tree
+ * Test inserting many records into v2 B-tree
*/
TESTING("B-tree insert: split root");
@@ -524,7 +524,7 @@ test_insert_level1_2leaf_redistrib(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -532,7 +532,7 @@ test_insert_level1_2leaf_redistrib(hid_t fapl)
}
/*
- * Create v2 B-tree
+ * Create v2 B-tree
*/
if (H5B2_create(f, H5P_DATASET_XFER_DEFAULT, H5B2_TEST, 512, 8, 100, 40, &bt2_addr/*out*/)<0) {
H5_FAILED();
@@ -541,7 +541,7 @@ test_insert_level1_2leaf_redistrib(hid_t fapl)
}
/*
- * Test inserting many records into v2 B-tree
+ * Test inserting many records into v2 B-tree
*/
TESTING("B-tree insert: redistribute 2 leaves in level 1 B-tree (l->r)");
@@ -567,7 +567,7 @@ test_insert_level1_2leaf_redistrib(hid_t fapl)
PASSED();
/*
- * Create v2 B-tree
+ * Create v2 B-tree
*/
if (H5B2_create(f, H5P_DATASET_XFER_DEFAULT, H5B2_TEST, 512, 8, 100, 40, &bt2_addr/*out*/)<0) {
H5_FAILED();
@@ -576,7 +576,7 @@ test_insert_level1_2leaf_redistrib(hid_t fapl)
}
/*
- * Test inserting many records into v2 B-tree
+ * Test inserting many records into v2 B-tree
*/
TESTING("B-tree insert: redistribute 2 leaves in level 1 B-tree (r->l)");
@@ -647,7 +647,7 @@ test_insert_level1_2leaf_split(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -655,7 +655,7 @@ test_insert_level1_2leaf_split(hid_t fapl)
}
/*
- * Create v2 B-tree
+ * Create v2 B-tree
*/
if (H5B2_create(f, H5P_DATASET_XFER_DEFAULT, H5B2_TEST, 512, 8, 100, 40, &bt2_addr/*out*/)<0) {
H5_FAILED();
@@ -664,7 +664,7 @@ test_insert_level1_2leaf_split(hid_t fapl)
}
/*
- * Test inserting many records into v2 B-tree
+ * Test inserting many records into v2 B-tree
*/
TESTING("B-tree insert: split 2 leaves to 3 in level 1 B-tree (l->r)");
@@ -690,7 +690,7 @@ test_insert_level1_2leaf_split(hid_t fapl)
PASSED();
/*
- * Create v2 B-tree
+ * Create v2 B-tree
*/
if (H5B2_create(f, H5P_DATASET_XFER_DEFAULT, H5B2_TEST, 512, 8, 100, 40, &bt2_addr/*out*/)<0) {
H5_FAILED();
@@ -699,7 +699,7 @@ test_insert_level1_2leaf_split(hid_t fapl)
}
/*
- * Test inserting many records into v2 B-tree
+ * Test inserting many records into v2 B-tree
*/
TESTING("B-tree insert: split 2 leaves to 3 in level 1 B-tree (r->l)");
@@ -772,7 +772,7 @@ test_insert_level1_3leaf_redistrib(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -780,7 +780,7 @@ test_insert_level1_3leaf_redistrib(hid_t fapl)
}
/*
- * Create v2 B-tree
+ * Create v2 B-tree
*/
if (H5B2_create(f, H5P_DATASET_XFER_DEFAULT, H5B2_TEST, 512, 8, 100, 40, &bt2_addr/*out*/)<0) {
H5_FAILED();
@@ -789,7 +789,7 @@ test_insert_level1_3leaf_redistrib(hid_t fapl)
}
/*
- * Test inserting many records into v2 B-tree
+ * Test inserting many records into v2 B-tree
*/
TESTING("B-tree insert: redistribute 3 leaves in level 1 B-tree");
@@ -873,7 +873,7 @@ test_insert_level1_3leaf_split(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -881,7 +881,7 @@ test_insert_level1_3leaf_split(hid_t fapl)
}
/*
- * Create v2 B-tree
+ * Create v2 B-tree
*/
if (H5B2_create(f, H5P_DATASET_XFER_DEFAULT, H5B2_TEST, 512, 8, 100, 40, &bt2_addr/*out*/)<0) {
H5_FAILED();
@@ -890,7 +890,7 @@ test_insert_level1_3leaf_split(hid_t fapl)
}
/*
- * Test inserting many records into v2 B-tree
+ * Test inserting many records into v2 B-tree
*/
TESTING("B-tree insert: split 3 leaves to 4 in level 1 B-tree");
@@ -960,7 +960,7 @@ test_insert_make_level2(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -968,7 +968,7 @@ test_insert_make_level2(hid_t fapl)
}
/*
- * Create v2 B-tree
+ * Create v2 B-tree
*/
if (H5B2_create(f, H5P_DATASET_XFER_DEFAULT, H5B2_TEST, 512, 8, 100, 40, &bt2_addr/*out*/)<0) {
H5_FAILED();
@@ -977,7 +977,7 @@ test_insert_make_level2(hid_t fapl)
}
/*
- * Test inserting many records into v2 B-tree
+ * Test inserting many records into v2 B-tree
*/
TESTING("B-tree insert: make level 2 B-tree");
@@ -1126,7 +1126,7 @@ test_insert_level2_leaf_redistrib(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -1134,7 +1134,7 @@ test_insert_level2_leaf_redistrib(hid_t fapl)
}
/*
- * Create v2 B-tree
+ * Create v2 B-tree
*/
if (H5B2_create(f, H5P_DATASET_XFER_DEFAULT, H5B2_TEST, 512, 8, 100, 40, &bt2_addr/*out*/)<0) {
H5_FAILED();
@@ -1143,7 +1143,7 @@ test_insert_level2_leaf_redistrib(hid_t fapl)
}
/*
- * Test inserting many records into v2 B-tree
+ * Test inserting many records into v2 B-tree
*/
TESTING("B-tree insert: redistrib right-most leaf in level 2 B-tree");
@@ -1252,7 +1252,7 @@ test_insert_level2_leaf_split(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -1260,7 +1260,7 @@ test_insert_level2_leaf_split(hid_t fapl)
}
/*
- * Create v2 B-tree
+ * Create v2 B-tree
*/
if (H5B2_create(f, H5P_DATASET_XFER_DEFAULT, H5B2_TEST, 512, 8, 100, 40, &bt2_addr/*out*/)<0) {
H5_FAILED();
@@ -1269,7 +1269,7 @@ test_insert_level2_leaf_split(hid_t fapl)
}
/*
- * Test inserting many records into v2 B-tree
+ * Test inserting many records into v2 B-tree
*/
TESTING("B-tree insert: split right-most leaf in level 2 B-tree");
@@ -1379,7 +1379,7 @@ test_insert_level2_2internal_redistrib(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -1387,7 +1387,7 @@ test_insert_level2_2internal_redistrib(hid_t fapl)
}
/*
- * Create v2 B-tree
+ * Create v2 B-tree
*/
if (H5B2_create(f, H5P_DATASET_XFER_DEFAULT, H5B2_TEST, 512, 8, 100, 40, &bt2_addr/*out*/)<0) {
H5_FAILED();
@@ -1396,7 +1396,7 @@ test_insert_level2_2internal_redistrib(hid_t fapl)
}
/*
- * Test inserting many records into v2 B-tree
+ * Test inserting many records into v2 B-tree
*/
TESTING("B-tree insert: redist. 2 internal (r->l) in level 2 B-tree");
@@ -1484,7 +1484,7 @@ test_insert_level2_2internal_split(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -1492,7 +1492,7 @@ test_insert_level2_2internal_split(hid_t fapl)
}
/*
- * Create v2 B-tree
+ * Create v2 B-tree
*/
if (H5B2_create(f, H5P_DATASET_XFER_DEFAULT, H5B2_TEST, 512, 8, 100, 40, &bt2_addr/*out*/)<0) {
H5_FAILED();
@@ -1501,7 +1501,7 @@ test_insert_level2_2internal_split(hid_t fapl)
}
/*
- * Test inserting many records into v2 B-tree
+ * Test inserting many records into v2 B-tree
*/
TESTING("B-tree insert: split 2 internals to 3 in level 2 B-tree (r->l)");
@@ -1590,7 +1590,7 @@ test_insert_level2_3internal_redistrib(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -1598,7 +1598,7 @@ test_insert_level2_3internal_redistrib(hid_t fapl)
}
/*
- * Create v2 B-tree
+ * Create v2 B-tree
*/
if (H5B2_create(f, H5P_DATASET_XFER_DEFAULT, H5B2_TEST, 512, 8, 100, 40, &bt2_addr/*out*/)<0) {
H5_FAILED();
@@ -1607,7 +1607,7 @@ test_insert_level2_3internal_redistrib(hid_t fapl)
}
/*
- * Test inserting many records into v2 B-tree
+ * Test inserting many records into v2 B-tree
*/
TESTING("B-tree insert: redistrib 3 internals in level 2 B-tree");
@@ -1693,7 +1693,7 @@ test_insert_level2_3internal_split(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -1701,7 +1701,7 @@ test_insert_level2_3internal_split(hid_t fapl)
}
/*
- * Create v2 B-tree
+ * Create v2 B-tree
*/
if (H5B2_create(f, H5P_DATASET_XFER_DEFAULT, H5B2_TEST, 512, 8, 100, 40, &bt2_addr/*out*/)<0) {
H5_FAILED();
@@ -1710,7 +1710,7 @@ test_insert_level2_3internal_split(hid_t fapl)
}
/*
- * Test inserting many records into v2 B-tree
+ * Test inserting many records into v2 B-tree
*/
TESTING("B-tree insert: split 3 internals to 4 in level 2 B-tree");
@@ -1822,7 +1822,7 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time);
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -1830,7 +1830,7 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time);
}
/*
- * Create v2 B-tree
+ * Create v2 B-tree
*/
if (H5B2_create(f, H5P_DATASET_XFER_DEFAULT, H5B2_TEST, 512, 8, 100, 40, &bt2_addr/*out*/)<0) {
H5_FAILED();
@@ -1839,7 +1839,7 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time);
}
/*
- * Test inserting many records into v2 B-tree
+ * Test inserting many records into v2 B-tree
*/
TESTING("B-tree insert: create random level 4 B-tree");
@@ -1974,7 +1974,7 @@ test_remove_basic(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -2304,7 +2304,7 @@ test_remove_level1_noredistrib(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -2487,7 +2487,7 @@ test_remove_level1_redistrib(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -2655,7 +2655,7 @@ test_remove_level1_2leaf_merge(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -2809,7 +2809,7 @@ test_remove_level1_3leaf_merge(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -2925,7 +2925,7 @@ test_remove_level1_promote(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -3087,7 +3087,7 @@ test_remove_level1_promote_2leaf_redistrib(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -3225,7 +3225,7 @@ test_remove_level1_promote_3leaf_redistrib(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -3363,7 +3363,7 @@ test_remove_level1_promote_2leaf_merge(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -3501,7 +3501,7 @@ test_remove_level1_promote_3leaf_merge(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -3639,7 +3639,7 @@ test_remove_level1_collapse(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -3755,7 +3755,7 @@ test_remove_level2_promote(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -3961,7 +3961,7 @@ test_remove_level2_promote_2internal_redistrib(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -4097,7 +4097,7 @@ test_remove_level2_promote_3internal_redistrib(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -4233,7 +4233,7 @@ test_remove_level2_promote_2internal_merge(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -4369,7 +4369,7 @@ test_remove_level2_promote_3internal_merge(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -4505,7 +4505,7 @@ test_remove_level2_2internal_merge_left(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -4621,7 +4621,7 @@ test_remove_level2_2internal_merge_right(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -4737,7 +4737,7 @@ test_remove_level2_3internal_merge(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -4853,7 +4853,7 @@ test_remove_level2_collapse_right(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -4997,7 +4997,7 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time);
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -5005,7 +5005,7 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time);
}
/*
- * Create v2 B-tree
+ * Create v2 B-tree
*/
if (H5B2_create(f, H5P_DATASET_XFER_DEFAULT, H5B2_TEST, 512, 8, 100, 40, &bt2_addr/*out*/)<0) {
H5_FAILED();
@@ -5014,7 +5014,7 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time);
}
/*
- * Test inserting many records into v2 B-tree
+ * Test inserting many records into v2 B-tree
*/
TESTING("B-tree remove: create random level 4 B-tree and delete all records");
@@ -5120,7 +5120,7 @@ test_find_neighbor(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -5128,7 +5128,7 @@ test_find_neighbor(hid_t fapl)
}
/*
- * Create v2 B-tree
+ * Create v2 B-tree
*/
if (H5B2_create(f, H5P_DATASET_XFER_DEFAULT, H5B2_TEST, 512, 8, 100, 40, &bt2_addr/*out*/)<0) {
H5_FAILED();
@@ -5306,7 +5306,7 @@ test_delete(hid_t fapl)
} /* end if */
/*
- * Create v2 B-tree
+ * Create v2 B-tree
*/
if (H5B2_create(f, H5P_DATASET_XFER_DEFAULT, H5B2_TEST, 512, 8, 100, 40, &bt2_addr/*out*/)<0) {
H5_FAILED();
@@ -5315,7 +5315,7 @@ test_delete(hid_t fapl)
} /* end if */
/*
- * Delete v2 B-tree
+ * Delete v2 B-tree
*/
if (H5B2_delete(f, H5P_DATASET_XFER_DEFAULT, H5B2_TEST, bt2_addr)<0) {
H5_FAILED();
@@ -5346,7 +5346,7 @@ test_delete(hid_t fapl)
} /* end if */
/*
- * Create v2 B-tree
+ * Create v2 B-tree
*/
if (H5B2_create(f, H5P_DATASET_XFER_DEFAULT, H5B2_TEST, 512, 8, 100, 40, &bt2_addr/*out*/)<0) {
H5_FAILED();
@@ -5365,7 +5365,7 @@ test_delete(hid_t fapl)
} /* end for */
/*
- * Delete v2 B-tree
+ * Delete v2 B-tree
*/
if (H5B2_delete(f, H5P_DATASET_XFER_DEFAULT, H5B2_TEST, bt2_addr)<0) {
H5_FAILED();
@@ -5396,7 +5396,7 @@ test_delete(hid_t fapl)
} /* end if */
/*
- * Create v2 B-tree
+ * Create v2 B-tree
*/
if (H5B2_create(f, H5P_DATASET_XFER_DEFAULT, H5B2_TEST, 512, 8, 100, 40, &bt2_addr/*out*/)<0) {
H5_FAILED();
@@ -5415,7 +5415,7 @@ test_delete(hid_t fapl)
} /* end for */
/*
- * Delete v2 B-tree
+ * Delete v2 B-tree
*/
if (H5B2_delete(f, H5P_DATASET_XFER_DEFAULT, H5B2_TEST, bt2_addr)<0) {
H5_FAILED();
@@ -5446,7 +5446,7 @@ test_delete(hid_t fapl)
} /* end if */
/*
- * Create v2 B-tree
+ * Create v2 B-tree
*/
if (H5B2_create(f, H5P_DATASET_XFER_DEFAULT, H5B2_TEST, 512, 8, 100, 40, &bt2_addr/*out*/)<0) {
H5_FAILED();
@@ -5465,7 +5465,7 @@ test_delete(hid_t fapl)
} /* end for */
/*
- * Delete v2 B-tree
+ * Delete v2 B-tree
*/
if (H5B2_delete(f, H5P_DATASET_XFER_DEFAULT, H5B2_TEST, bt2_addr)<0) {
H5_FAILED();
@@ -5527,7 +5527,7 @@ test_modify(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -5535,7 +5535,7 @@ test_modify(hid_t fapl)
} /* end if */
/*
- * Create v2 B-tree
+ * Create v2 B-tree
*/
if (H5B2_create(f, H5P_DATASET_XFER_DEFAULT, H5B2_TEST, 512, 8, 100, 40, &bt2_addr/*out*/)<0) {
H5_FAILED();
@@ -5642,9 +5642,9 @@ error:
*
* Purpose: Test the B-tree v2 code
*
- * Return: Success:
+ * Return: Success:
*
- * Failure:
+ * Failure:
*
* Programmer: Quincey Koziol
* Tuesday, February 1, 2005
diff --git a/test/cache.c b/test/cache.c
index c53d8aa..1ee2c22 100644
--- a/test/cache.c
+++ b/test/cache.c
@@ -15,7 +15,7 @@
/* Programmer: John Mainzer
* 6/9/04
*
- * This file contains tests for the cache implemented in
+ * This file contains tests for the cache implemented in
* H5C.c
*/
#include "h5test.h"
@@ -108,20 +108,20 @@ const char *FILENAME[] = {
#define MONSTER_ALT_BASE_ADDR (haddr_t)(HUGE_ALT_BASE_ADDR + \
(HUGE_ENTRY_SIZE * NUM_HUGE_ENTRIES))
-typedef struct test_entry_t
+typedef struct test_entry_t
{
- H5C_cache_entry_t header; /* entry data used by the cache
- * -- must be first
+ H5C_cache_entry_t header; /* entry data used by the cache
+ * -- must be first
*/
struct test_entry_t * self; /* pointer to this entry -- used for
* sanity checking.
*/
- haddr_t addr; /* where the cache thinks this entry
- * is located
+ haddr_t addr; /* where the cache thinks this entry
+ * is located
*/
hbool_t at_main_addr; /* boolean flag indicating whether
* the entry is supposed to be at
- * either its main or alternate
+ * either its main or alternate
* address.
*/
haddr_t main_addr; /* initial location of the entry
@@ -129,33 +129,33 @@ typedef struct test_entry_t
haddr_t alt_addr; /* location to which the entry
* can be relocated or "renamed"
*/
- size_t size; /* how big the cache thinks this
- * entry is
+ size_t size; /* how big the cache thinks this
+ * entry is
*/
- int32_t type; /* indicates which entry array this
- * entry is in
+ int32_t type; /* indicates which entry array this
+ * entry is in
*/
- int32_t index; /* index in its entry array
+ int32_t index; /* index in its entry array
*/
int32_t reads; /* number of times this entry has
* been loaded.
*/
- int32_t writes; /* number of times this entry has
- * been written
+ int32_t writes; /* number of times this entry has
+ * been written
*/
- hbool_t is_dirty; /* entry has been modified since
- * last write
+ hbool_t is_dirty; /* entry has been modified since
+ * last write
*/
- hbool_t is_protected; /* entry should currently be on
+ hbool_t is_protected; /* entry should currently be on
* the cache's protected list.
*/
- hbool_t loaded; /* entry has been loaded since the
+ hbool_t loaded; /* entry has been loaded since the
* last time it was reset.
*/
- hbool_t cleared; /* entry has been cleared since the
+ hbool_t cleared; /* entry has been cleared since the
* last time it was reset.
*/
- hbool_t flushed; /* entry has been flushed since the
+ hbool_t flushed; /* entry has been flushed since the
* last time it was reset.
*/
hbool_t destroyed; /* entry has been destroyed since the
@@ -163,7 +163,7 @@ typedef struct test_entry_t
*/
} test_entry_t;
-/* The following is a cut down copy of the hash table manipulation
+/* The following is a cut down copy of the hash table manipulation
* macros from H5C.c, which have been further modified to avoid references
* to the error reporting macros. Needless to say, these macros must be
* updated as necessary.
@@ -300,11 +300,11 @@ const size_t entry_sizes[NUMBER_OF_ENTRY_TYPES] =
PICO_ENTRY_SIZE,
NANO_ENTRY_SIZE,
MICRO_ENTRY_SIZE,
- TINY_ENTRY_SIZE,
+ TINY_ENTRY_SIZE,
SMALL_ENTRY_SIZE,
MEDIUM_ENTRY_SIZE,
LARGE_ENTRY_SIZE,
- HUGE_ENTRY_SIZE,
+ HUGE_ENTRY_SIZE,
MONSTER_ENTRY_SIZE
};
@@ -380,49 +380,49 @@ herr_t huge_dest(H5F_t * f, void * thing);
herr_t monster_dest(H5F_t * f, void * thing);
-static herr_t flush(H5F_t *f, hid_t UNUSED dxpl_id, hbool_t dest,
+static herr_t flush(H5F_t *f, hid_t UNUSED dxpl_id, hbool_t dest,
haddr_t addr, void *thing);
-herr_t pico_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest,
+herr_t pico_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest,
haddr_t addr, void *thing);
-herr_t nano_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest,
+herr_t nano_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest,
haddr_t addr, void *thing);
-herr_t micro_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest,
+herr_t micro_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest,
haddr_t addr, void *thing);
-herr_t tiny_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest,
+herr_t tiny_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest,
haddr_t addr, void *thing);
-herr_t small_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest,
+herr_t small_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest,
haddr_t addr, void *thing);
-herr_t medium_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest,
+herr_t medium_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest,
haddr_t addr, void *thing);
-herr_t large_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest,
+herr_t large_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest,
haddr_t addr, void *thing);
-herr_t huge_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest,
+herr_t huge_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest,
haddr_t addr, void *thing);
-herr_t monster_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest,
+herr_t monster_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest,
haddr_t addr, void *thing);
static void * load(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, haddr_t addr,
const void UNUSED *udata1, void UNUSED *udata2);
-void * pico_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
+void * pico_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
const void *udata1, void *udata2);
-void * nano_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
+void * nano_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
const void *udata1, void *udata2);
-void * micro_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
+void * micro_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
const void *udata1, void *udata2);
-void * tiny_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
+void * tiny_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
const void *udata1, void *udata2);
-void * small_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
+void * small_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
const void *udata1, void *udata2);
-void * medium_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
+void * medium_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
const void *udata1, void *udata2);
-void * large_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
+void * large_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
const void *udata1, void *udata2);
-void * huge_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
+void * huge_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
const void *udata1, void *udata2);
-void * monster_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
+void * monster_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
const void *udata1, void *udata2);
@@ -520,19 +520,19 @@ static const H5C_class_t types[NUMBER_OF_ENTRY_TYPES] =
/* private function declarations: */
-static void addr_to_type_and_index(haddr_t addr,
- int32_t * type_ptr,
+static void addr_to_type_and_index(haddr_t addr,
+ int32_t * type_ptr,
int32_t * index_ptr);
#if 0 /* keep this for a while -- it may be useful */
-static haddr_t type_and_index_to_addr(int32_t type,
+static haddr_t type_and_index_to_addr(int32_t type,
int32_t idx);
#endif
static void insert_entry(H5C_t * cache_ptr,
int32_t type,
int32_t idx,
- hbool_t dirty,
+ hbool_t dirty,
unsigned int flags);
static void rename_entry(H5C_t * cache_ptr,
@@ -680,8 +680,8 @@ static void check_auto_cache_resize_epoch_markers(void);
static void check_auto_cache_resize_input_errs(void);
static void check_auto_cache_resize_aux_fcns(void);
-static void takedown_cache(H5C_t * cache_ptr,
- hbool_t dump_stats,
+static void takedown_cache(H5C_t * cache_ptr,
+ hbool_t dump_stats,
hbool_t dump_detailed_stats);
static void flush_cache(H5C_t * cache_ptr,
@@ -733,7 +733,7 @@ static void check_file_mdc_api_errs(void);
/*-------------------------------------------------------------------------
* Function: addr_to_type_and_index
*
- * Purpose: Given an address, compute the type and index of the
+ * Purpose: Given an address, compute the type and index of the
* associated entry.
*
* Return: void
@@ -757,7 +757,7 @@ addr_to_type_and_index(haddr_t addr,
HDassert( type_ptr );
HDassert( index_ptr );
- /* we only have a small number of entry types, so just do a
+ /* we only have a small number of entry types, so just do a
* linear search. If NUMBER_OF_ENTRY_TYPES grows, we may want
* to do a binary search instead.
*/
@@ -808,13 +808,13 @@ addr_to_type_and_index(haddr_t addr,
} /* addr_to_type_and_index() */
-#if 0 /* This function has never been used, but we may want it
+#if 0 /* This function has never been used, but we may want it
* some time. Lets keep it for now.
*/
/*-------------------------------------------------------------------------
* Function: type_and_index_to_addr
*
- * Purpose: Given a type and index of an entry, compute the associated
+ * Purpose: Given a type and index of an entry, compute the associated
* addr and return that value.
*
* Return: computed addr
@@ -896,7 +896,7 @@ check_write_permitted(const H5F_t UNUSED * f,
/*-------------------------------------------------------------------------
* Function: clear & friends
*
- * Purpose: clear the entry. The helper functions verify that the
+ * Purpose: clear the entry. The helper functions verify that the
* correct version of clear is being called, and then call
* clear proper.
*
@@ -910,7 +910,7 @@ check_write_permitted(const H5F_t UNUSED * f,
*-------------------------------------------------------------------------
*/
-static herr_t
+static herr_t
clear(H5F_t * f,
void * thing,
hbool_t dest)
@@ -946,74 +946,74 @@ clear(H5F_t * f,
} /* clear() */
-herr_t
+herr_t
pico_clear(H5F_t * f, void * thing, hbool_t dest)
{
HDassert ( ((test_entry_t *)thing)->type == PICO_ENTRY_TYPE );
return(clear(f, thing, dest));
-}
+}
-herr_t
+herr_t
nano_clear(H5F_t * f, void * thing, hbool_t dest)
{
HDassert ( ((test_entry_t *)thing)->type == NANO_ENTRY_TYPE );
return(clear(f, thing, dest));
-}
+}
-herr_t
+herr_t
micro_clear(H5F_t * f, void * thing, hbool_t dest)
{
HDassert ( ((test_entry_t *)thing)->type == MICRO_ENTRY_TYPE );
return(clear(f, thing, dest));
-}
+}
-herr_t
+herr_t
tiny_clear(H5F_t * f, void * thing, hbool_t dest)
{
HDassert ( ((test_entry_t *)thing)->type == TINY_ENTRY_TYPE );
return(clear(f, thing, dest));
-}
+}
-herr_t
+herr_t
small_clear(H5F_t * f, void * thing, hbool_t dest)
{
HDassert ( ((test_entry_t *)thing)->type == SMALL_ENTRY_TYPE );
return(clear(f, thing, dest));
-}
+}
-herr_t
+herr_t
medium_clear(H5F_t * f, void * thing, hbool_t dest)
{
HDassert ( ((test_entry_t *)thing)->type == MEDIUM_ENTRY_TYPE );
return(clear(f, thing, dest));
-}
+}
-herr_t
+herr_t
large_clear(H5F_t * f, void * thing, hbool_t dest)
{
HDassert ( ((test_entry_t *)thing)->type == LARGE_ENTRY_TYPE );
return(clear(f, thing, dest));
-}
+}
-herr_t
+herr_t
huge_clear(H5F_t * f, void * thing, hbool_t dest)
{
HDassert ( ((test_entry_t *)thing)->type == HUGE_ENTRY_TYPE );
return(clear(f, thing, dest));
-}
+}
-herr_t
+herr_t
monster_clear(H5F_t * f, void * thing, hbool_t dest)
{
HDassert ( ((test_entry_t *)thing)->type == MONSTER_ENTRY_TYPE );
return(clear(f, thing, dest));
-}
+}
/*-------------------------------------------------------------------------
* Function: dest & friends
*
- * Purpose: Destroy the entry. The helper functions verify that the
+ * Purpose: Destroy the entry. The helper functions verify that the
* correct version of dest is being called, and then call
* dest proper.
*
@@ -1027,7 +1027,7 @@ monster_clear(H5F_t * f, void * thing, hbool_t dest)
*-------------------------------------------------------------------------
*/
-static herr_t
+static herr_t
destroy(H5F_t UNUSED * f,
void * thing)
{
@@ -1056,75 +1056,75 @@ destroy(H5F_t UNUSED * f,
} /* dest() */
-herr_t
+herr_t
pico_dest(H5F_t * f, void * thing)
{
HDassert ( ((test_entry_t *)thing)->type == PICO_ENTRY_TYPE );
return(destroy(f, thing));
-}
+}
-herr_t
+herr_t
nano_dest(H5F_t * f, void * thing)
{
HDassert ( ((test_entry_t *)thing)->type == NANO_ENTRY_TYPE );
return(destroy(f, thing));
-}
+}
-herr_t
+herr_t
micro_dest(H5F_t * f, void * thing)
{
HDassert ( ((test_entry_t *)thing)->type == MICRO_ENTRY_TYPE );
return(destroy(f, thing));
-}
+}
-herr_t
+herr_t
tiny_dest(H5F_t * f, void * thing)
{
HDassert ( ((test_entry_t *)thing)->type == TINY_ENTRY_TYPE );
return(destroy(f, thing));
-}
+}
-herr_t
+herr_t
small_dest(H5F_t * f, void * thing)
{
HDassert ( ((test_entry_t *)thing)->type == SMALL_ENTRY_TYPE );
return(destroy(f, thing));
-}
+}
-herr_t
+herr_t
medium_dest(H5F_t * f, void * thing)
{
HDassert ( ((test_entry_t *)thing)->type == MEDIUM_ENTRY_TYPE );
return(destroy(f, thing));
-}
+}
-herr_t
+herr_t
large_dest(H5F_t * f, void * thing)
{
HDassert ( ((test_entry_t *)thing)->type == LARGE_ENTRY_TYPE );
return(destroy(f, thing));
-}
+}
-herr_t
+herr_t
huge_dest(H5F_t * f, void * thing)
{
HDassert ( ((test_entry_t *)thing)->type == HUGE_ENTRY_TYPE );
return(destroy(f, thing));
-}
+}
-herr_t
+herr_t
monster_dest(H5F_t * f, void * thing)
{
HDassert ( ((test_entry_t *)thing)->type == MONSTER_ENTRY_TYPE );
return(destroy(f, thing));
-}
+}
/*-------------------------------------------------------------------------
* Function: flush & friends
*
- * Purpose: flush the entry and mark it as clean. The helper functions
- * verify that the correct version of flush is being called,
+ * Purpose: flush the entry and mark it as clean. The helper functions
+ * verify that the correct version of flush is being called,
* and then call flush proper.
*
* Return: SUCCEED
@@ -1137,7 +1137,7 @@ monster_dest(H5F_t * f, void * thing)
*-------------------------------------------------------------------------
*/
-static herr_t
+static herr_t
flush(H5F_t *f,
hid_t UNUSED dxpl_id,
hbool_t dest,
@@ -1187,74 +1187,74 @@ flush(H5F_t *f,
} /* flush() */
-herr_t
+herr_t
pico_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, void *thing)
{
HDassert ( ((test_entry_t *)thing)->type == PICO_ENTRY_TYPE );
return(flush(f, dxpl_id, dest, addr, thing));
-}
+}
-herr_t
+herr_t
nano_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, void *thing)
{
HDassert ( ((test_entry_t *)thing)->type == NANO_ENTRY_TYPE );
return(flush(f, dxpl_id, dest, addr, thing));
-}
+}
-herr_t
+herr_t
micro_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, void *thing)
{
HDassert ( ((test_entry_t *)thing)->type == MICRO_ENTRY_TYPE );
return(flush(f, dxpl_id, dest, addr, thing));
-}
+}
-herr_t
+herr_t
tiny_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, void *thing)
{
HDassert ( ((test_entry_t *)thing)->type == TINY_ENTRY_TYPE );
return(flush(f, dxpl_id, dest, addr, thing));
-}
+}
-herr_t
+herr_t
small_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, void *thing)
{
HDassert ( ((test_entry_t *)thing)->type == SMALL_ENTRY_TYPE );
return(flush(f, dxpl_id, dest, addr, thing));
-}
+}
-herr_t
+herr_t
medium_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, void *thing)
{
HDassert ( ((test_entry_t *)thing)->type == MEDIUM_ENTRY_TYPE );
return(flush(f, dxpl_id, dest, addr, thing));
-}
+}
-herr_t
+herr_t
large_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, void *thing)
{
HDassert ( ((test_entry_t *)thing)->type == LARGE_ENTRY_TYPE );
return(flush(f, dxpl_id, dest, addr, thing));
-}
+}
-herr_t
+herr_t
huge_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, void *thing)
{
HDassert ( ((test_entry_t *)thing)->type == HUGE_ENTRY_TYPE );
return(flush(f, dxpl_id, dest, addr, thing));
-}
+}
-herr_t
+herr_t
monster_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, void *thing)
{
HDassert ( ((test_entry_t *)thing)->type == MONSTER_ENTRY_TYPE );
return(flush(f, dxpl_id, dest, addr, thing));
-}
+}
/*-------------------------------------------------------------------------
* Function: load & friends
*
- * Purpose: "load" the requested entry and mark it as clean. The
+ * Purpose: "load" the requested entry and mark it as clean. The
* helper functions verify that the correct version of load
* is being called, and then call load proper.
*
@@ -1306,75 +1306,75 @@ load(H5F_t UNUSED *f,
} /* load() */
-void *
-pico_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
+void *
+pico_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
const void *udata1, void *udata2)
{
return(load(f, dxpl_id, addr, udata1, udata2));
-}
+}
void *
-nano_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
+nano_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
const void *udata1, void *udata2)
{
return(load(f, dxpl_id, addr, udata1, udata2));
-}
+}
void *
-micro_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
+micro_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
const void *udata1, void *udata2)
{
return(load(f, dxpl_id, addr, udata1, udata2));
-}
+}
void *
-tiny_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
+tiny_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
const void *udata1, void *udata2)
{
return(load(f, dxpl_id, addr, udata1, udata2));
-}
+}
void *
-small_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
+small_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
const void *udata1, void *udata2)
{
return(load(f, dxpl_id, addr, udata1, udata2));
-}
+}
void *
-medium_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
+medium_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
const void *udata1, void *udata2)
{
return(load(f, dxpl_id, addr, udata1, udata2));
-}
+}
void *
-large_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
+large_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
const void *udata1, void *udata2)
{
return(load(f, dxpl_id, addr, udata1, udata2));
-}
+}
void *
-huge_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
+huge_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
const void *udata1, void *udata2)
{
return(load(f, dxpl_id, addr, udata1, udata2));
-}
+}
void *
-monster_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
+monster_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
const void *udata1, void *udata2)
{
return(load(f, dxpl_id, addr, udata1, udata2));
-}
+}
/*-------------------------------------------------------------------------
* Function: size & friends
*
- * Purpose: Get the size of the specified entry. The helper functions
- * verify that the correct version of size is being called,
+ * Purpose: Get the size of the specified entry. The helper functions
+ * verify that the correct version of size is being called,
* and then call size proper.
*
* Return: SUCCEED
@@ -1387,7 +1387,7 @@ monster_load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
*-------------------------------------------------------------------------
*/
-static herr_t
+static herr_t
size(H5F_t UNUSED * f,
void * thing,
size_t * size_ptr)
@@ -1414,68 +1414,68 @@ size(H5F_t UNUSED * f,
} /* size() */
-herr_t
+herr_t
pico_size(H5F_t * f, void * thing, size_t * size_ptr)
{
HDassert ( ((test_entry_t *)thing)->type == PICO_ENTRY_TYPE );
return(size(f, thing, size_ptr));
-}
+}
-herr_t
+herr_t
nano_size(H5F_t * f, void * thing, size_t * size_ptr)
{
HDassert ( ((test_entry_t *)thing)->type == NANO_ENTRY_TYPE );
return(size(f, thing, size_ptr));
-}
+}
-herr_t
+herr_t
micro_size(H5F_t * f, void * thing, size_t * size_ptr)
{
HDassert ( ((test_entry_t *)thing)->type == MICRO_ENTRY_TYPE );
return(size(f, thing, size_ptr));
-}
+}
-herr_t
+herr_t
tiny_size(H5F_t * f, void * thing, size_t * size_ptr)
{
HDassert ( ((test_entry_t *)thing)->type == TINY_ENTRY_TYPE );
return(size(f, thing, size_ptr));
-}
+}
-herr_t
+herr_t
small_size(H5F_t * f, void * thing, size_t * size_ptr)
{
HDassert ( ((test_entry_t *)thing)->type == SMALL_ENTRY_TYPE );
return(size(f, thing, size_ptr));
-}
+}
-herr_t
+herr_t
medium_size(H5F_t * f, void * thing, size_t * size_ptr)
{
HDassert ( ((test_entry_t *)thing)->type == MEDIUM_ENTRY_TYPE );
return(size(f, thing, size_ptr));
-}
+}
-herr_t
+herr_t
large_size(H5F_t * f, void * thing, size_t * size_ptr)
{
HDassert ( ((test_entry_t *)thing)->type == LARGE_ENTRY_TYPE );
return(size(f, thing, size_ptr));
-}
+}
-herr_t
+herr_t
huge_size(H5F_t * f, void * thing, size_t * size_ptr)
{
HDassert ( ((test_entry_t *)thing)->type == HUGE_ENTRY_TYPE );
return(size(f, thing, size_ptr));
-}
+}
-herr_t
+herr_t
monster_size(H5F_t * f, void * thing, size_t * size_ptr)
{
HDassert ( ((test_entry_t *)thing)->type == MONSTER_ENTRY_TYPE );
return(size(f, thing, size_ptr));
-}
+}
/**************************************************************************/
@@ -1487,7 +1487,7 @@ monster_size(H5F_t * f, void * thing, size_t * size_ptr)
/*-------------------------------------------------------------------------
* Function: entry_in_cache
*
- * Purpose: Given a pointer to a cache, an entry type, and an index,
+ * Purpose: Given a pointer to a cache, an entry type, and an index,
* determine if the entry is currently in the cache.
*
* Return: TRUE if the entry is in the cache, and FALSE otherwise.
@@ -1660,7 +1660,7 @@ verify_clean(void)
for ( j = 0; j <= max_index; j++ )
{
if ( ( base_addr[j].header.is_dirty ) || ( base_addr[j].is_dirty ) ) {
-
+
dirty_count++;
}
}
@@ -1681,7 +1681,7 @@ verify_clean(void)
/*-------------------------------------------------------------------------
* Function: verify_unprotected
*
- * Purpose: Verify that no cache entries are marked as protected. If
+ * Purpose: Verify that no cache entries are marked as protected. If
* any are, set pass to FALSE.
*
* Do nothing if pass is FALSE on entry.
@@ -1717,12 +1717,12 @@ verify_unprotected(void)
for ( j = 0; j <= max_index; j++ )
{
- HDassert( base_addr[j].header.is_protected ==
+ HDassert( base_addr[j].header.is_protected ==
base_addr[j].is_protected );
- if ( ( base_addr[j].header.is_protected ) ||
+ if ( ( base_addr[j].header.is_protected ) ||
( base_addr[j].is_protected ) ) {
-
+
protected_count++;
}
}
@@ -1763,7 +1763,7 @@ setup_cache(size_t max_cache_size,
{
H5C_t * cache_ptr = NULL;
- cache_ptr = H5C_create(max_cache_size,
+ cache_ptr = H5C_create(max_cache_size,
min_clean_size,
(NUMBER_OF_ENTRY_TYPES - 1),
(const char **)entry_type_names,
@@ -1825,7 +1825,7 @@ takedown_cache(H5C_t * cache_ptr,
/*-------------------------------------------------------------------------
* Function: flush_cache()
*
- * Purpose: Flush the specified cache, destroying all entries if
+ * Purpose: Flush the specified cache, destroying all entries if
requested. If requested, dump stats first.
*
* Return: void
@@ -1854,12 +1854,12 @@ flush_cache(H5C_t * cache_ptr,
if ( destroy_entries ) {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr,
+ result = H5C_flush_cache(NULL, -1, -1, cache_ptr,
H5C__FLUSH_INVALIDATE_FLAG);
} else {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr,
+ result = H5C_flush_cache(NULL, -1, -1, cache_ptr,
H5C__NO_FLAGS_SET);
}
}
@@ -1900,11 +1900,11 @@ flush_cache(H5C_t * cache_ptr,
* Modifications:
*
* JRM -- 1/13/05
- * Updated function for the flags parameter in
+ * Updated function for the flags parameter in
* H5C_insert_entry(), and to allow access to this parameter.
*
* JRM -- 6/17/05
- * The interface no longer permits clean inserts.
+ * The interface no longer permits clean inserts.
* Accordingly, the dirty parameter is no longer meaningfull.
*
*-------------------------------------------------------------------------
@@ -1914,7 +1914,7 @@ static void
insert_entry(H5C_t * cache_ptr,
int32_t type,
int32_t idx,
- hbool_t dirty,
+ hbool_t dirty,
unsigned int flags)
{
herr_t result;
@@ -1949,7 +1949,7 @@ insert_entry(H5C_t * cache_ptr,
pass = FALSE;
failure_mssg = "error in H5C_insert().";
-#if 0
+#if 0
/* This is useful debugging code. Lets keep it around. */
HDfprintf(stdout, "result = %d\n", (int)result);
@@ -1957,10 +1957,10 @@ insert_entry(H5C_t * cache_ptr,
(int)(entry_ptr->header.is_protected));
HDfprintf(stdout, "entry_ptr->header.type != &(types[type]) = %d\n",
(int)(entry_ptr->header.type != &(types[type])));
- HDfprintf(stdout,
+ HDfprintf(stdout,
"entry_ptr->size != entry_ptr->header.size = %d\n",
(int)(entry_ptr->size != entry_ptr->header.size));
- HDfprintf(stdout,
+ HDfprintf(stdout,
"entry_ptr->addr != entry_ptr->header.addr = %d\n",
(int)(entry_ptr->addr != entry_ptr->header.addr));
#endif
@@ -2022,7 +2022,7 @@ rename_entry(H5C_t * cache_ptr,
HDassert( !(entry_ptr->is_protected) );
HDassert( !(entry_ptr->header.is_protected) );
- if ( entry_ptr->at_main_addr && !main_addr ) {
+ if ( entry_ptr->at_main_addr && !main_addr ) {
/* rename to alt addr */
@@ -2032,7 +2032,7 @@ rename_entry(H5C_t * cache_ptr,
old_addr = entry_ptr->addr;
new_addr = entry_ptr->alt_addr;
- } else if ( !(entry_ptr->at_main_addr) && main_addr ) {
+ } else if ( !(entry_ptr->at_main_addr) && main_addr ) {
/* rename to main addr */
@@ -2125,9 +2125,9 @@ protect_entry(H5C_t * cache_ptr,
( entry_ptr->size != entry_ptr->header.size ) ||
( entry_ptr->addr != entry_ptr->header.addr ) ) {
-#if 0
- /* I've written the following debugging code several times
- * now. Lets keep it around so I don't have to write it
+#if 0
+ /* I've written the following debugging code several times
+ * now. Lets keep it around so I don't have to write it
* again.
* - JRM
*/
@@ -2137,10 +2137,10 @@ protect_entry(H5C_t * cache_ptr,
(long)cache_entry_ptr, (long)entry_ptr);
HDfprintf(stdout, "entry_ptr->header.is_protected = %d\n",
(int)(entry_ptr->header.is_protected));
- HDfprintf(stdout,
+ HDfprintf(stdout,
"( entry_ptr->header.type != &(types[type]) ) = %d\n",
(int)( entry_ptr->header.type != &(types[type]) ));
- HDfprintf(stdout,
+ HDfprintf(stdout,
"entry_ptr->size = %d, entry_ptr->header.size = %d\n",
(int)(entry_ptr->size), (int)(entry_ptr->header.size));
HDfprintf(stdout,
@@ -2179,11 +2179,11 @@ protect_entry(H5C_t * cache_ptr,
* Modifications:
*
* JRM -- 1/7/05
- * Updated for the replacement of the deleted parameter in
+ * Updated for the replacement of the deleted parameter in
* H5C_unprotect() with the new flags parameter.
*
* JRM - 6/17/05
- * Modified function to use the new dirtied parameter of
+ * Modified function to use the new dirtied parameter of
* H5C_unprotect().
*
*-------------------------------------------------------------------------
@@ -2225,7 +2225,7 @@ unprotect_entry(H5C_t * cache_ptr,
}
result = H5C_unprotect(NULL, -1, -1, cache_ptr, &(types[type]),
- entry_ptr->addr, (void *)entry_ptr,
+ entry_ptr->addr, (void *)entry_ptr,
flags);
if ( ( result < 0 ) ||
@@ -2340,9 +2340,9 @@ row_major_scan_forward(H5C_t * cache_ptr,
( ( (idx + lag - 2) % 3 ) == 0 ) ) {
if ( verbose )
- HDfprintf(stdout, "(u, %d, %d) ", type, (idx + lag - 2));
+ HDfprintf(stdout, "(u, %d, %d) ", type, (idx + lag - 2));
- unprotect_entry(cache_ptr, type, idx+lag-2, NO_CHANGE,
+ unprotect_entry(cache_ptr, type, idx+lag-2, NO_CHANGE,
H5C__NO_FLAGS_SET);
}
@@ -2351,7 +2351,7 @@ row_major_scan_forward(H5C_t * cache_ptr,
( (idx + lag - 2) <= max_indices[type] ) &&
( ( (idx + lag - 2) % 3 ) == 0 ) ) {
- rename_entry(cache_ptr, type, (idx + lag - 2),
+ rename_entry(cache_ptr, type, (idx + lag - 2),
rename_to_main_addr);
}
@@ -2373,14 +2373,14 @@ row_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, (idx + lag - 5));
- unprotect_entry(cache_ptr, type, idx+lag-5, NO_CHANGE,
+ unprotect_entry(cache_ptr, type, idx+lag-5, NO_CHANGE,
H5C__NO_FLAGS_SET);
}
if ( ( pass ) && ( idx >= 0 ) && ( idx <= max_indices[type] ) ) {
if ( verbose )
- HDfprintf(stdout, "(p, %d, %d) ", type, idx);
+ HDfprintf(stdout, "(p, %d, %d) ", type, idx);
protect_entry(cache_ptr, type, idx);
}
@@ -2393,7 +2393,7 @@ row_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, (idx - lag + 2));
- unprotect_entry(cache_ptr, type, idx-lag+2, NO_CHANGE,
+ unprotect_entry(cache_ptr, type, idx-lag+2, NO_CHANGE,
H5C__NO_FLAGS_SET);
}
@@ -2428,7 +2428,7 @@ row_major_scan_forward(H5C_t * cache_ptr,
} else {
unprotect_entry(cache_ptr, type, idx - lag,
- dirty_unprotects,
+ dirty_unprotects,
H5C__NO_FLAGS_SET);
}
break;
@@ -2446,7 +2446,7 @@ row_major_scan_forward(H5C_t * cache_ptr,
} else {
unprotect_entry(cache_ptr, type, idx - lag,
- dirty_destroys,
+ dirty_destroys,
H5C__DELETED_FLAG);
}
break;
@@ -2465,11 +2465,11 @@ row_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, (idx - lag));
- unprotect_entry(cache_ptr, type, idx - lag,
+ unprotect_entry(cache_ptr, type, idx - lag,
dirty_unprotects, H5C__NO_FLAGS_SET);
}
}
-
+
if ( verbose )
HDfprintf(stdout, "\n");
@@ -2492,7 +2492,7 @@ row_major_scan_forward(H5C_t * cache_ptr,
* Function: hl_row_major_scan_forward()
*
* Purpose: Do a high locality sequence of inserts, protects, and
- * unprotects while scanning through the set of entries.
+ * unprotects while scanning through the set of entries.
* If pass is false on entry, do nothing.
*
* Return: void
@@ -2573,7 +2573,7 @@ hl_row_major_scan_forward(H5C_t * cache_ptr,
protect_entry(cache_ptr, type, i);
if ( verbose )
- HDfprintf(stdout, "(u, %d, %d) ", type, i);
+ HDfprintf(stdout, "(u, %d, %d) ", type, i);
unprotect_entry(cache_ptr, type, i, NO_CHANGE,
H5C__NO_FLAGS_SET);
@@ -2603,7 +2603,7 @@ hl_row_major_scan_forward(H5C_t * cache_ptr,
* Function: row_major_scan_backward()
*
* Purpose: Do a sequence of inserts, protects, unprotects, renames,
- * destroys while scanning backwards through the set of
+ * destroys while scanning backwards through the set of
* entries. If pass is false on entry, do nothing.
*
* Return: void
@@ -2631,7 +2631,7 @@ row_major_scan_backward(H5C_t * cache_ptr,
int dirty_destroys,
int dirty_unprotects)
{
- const char * fcn_name = "row_major_scan_backward";
+ const char * fcn_name = "row_major_scan_backward";
int32_t type;
int32_t idx;
@@ -2681,9 +2681,9 @@ row_major_scan_backward(H5C_t * cache_ptr,
( ( (idx - lag + 2) % 3 ) == 0 ) ) {
if ( verbose )
- HDfprintf(stdout, "(u, %d, %d) ", type, (idx - lag + 2));
+ HDfprintf(stdout, "(u, %d, %d) ", type, (idx - lag + 2));
- unprotect_entry(cache_ptr, type, idx-lag+2, NO_CHANGE,
+ unprotect_entry(cache_ptr, type, idx-lag+2, NO_CHANGE,
H5C__NO_FLAGS_SET);
}
@@ -2692,7 +2692,7 @@ row_major_scan_backward(H5C_t * cache_ptr,
( (idx - lag + 2) <= max_indices[type] ) &&
( ( (idx - lag + 2) % 3 ) == 0 ) ) {
- rename_entry(cache_ptr, type, (idx - lag + 2),
+ rename_entry(cache_ptr, type, (idx - lag + 2),
rename_to_main_addr);
}
@@ -2714,14 +2714,14 @@ row_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, (idx - lag + 5));
- unprotect_entry(cache_ptr, type, idx-lag+5, NO_CHANGE,
+ unprotect_entry(cache_ptr, type, idx-lag+5, NO_CHANGE,
H5C__NO_FLAGS_SET);
}
if ( ( pass ) && ( idx >= 0 ) && ( idx <= max_indices[type] ) ) {
if ( verbose )
- HDfprintf(stdout, "(p, %d, %d) ", type, idx);
+ HDfprintf(stdout, "(p, %d, %d) ", type, idx);
protect_entry(cache_ptr, type, idx);
}
@@ -2734,7 +2734,7 @@ row_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, (idx + lag - 2));
- unprotect_entry(cache_ptr, type, idx+lag-2, NO_CHANGE,
+ unprotect_entry(cache_ptr, type, idx+lag-2, NO_CHANGE,
H5C__NO_FLAGS_SET);
}
@@ -2764,7 +2764,7 @@ row_major_scan_backward(H5C_t * cache_ptr,
} else {
unprotect_entry(cache_ptr, type, idx + lag,
- dirty_unprotects,
+ dirty_unprotects,
H5C__NO_FLAGS_SET);
}
break;
@@ -2782,7 +2782,7 @@ row_major_scan_backward(H5C_t * cache_ptr,
} else {
unprotect_entry(cache_ptr, type, idx + lag,
- dirty_destroys,
+ dirty_destroys,
H5C__DELETED_FLAG);
}
break;
@@ -2805,11 +2805,11 @@ row_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, (idx - lag));
- unprotect_entry(cache_ptr, type, idx + lag,
+ unprotect_entry(cache_ptr, type, idx + lag,
dirty_unprotects, H5C__NO_FLAGS_SET);
}
}
-
+
if ( verbose )
HDfprintf(stdout, "\n");
@@ -2832,7 +2832,7 @@ row_major_scan_backward(H5C_t * cache_ptr,
* Function: hl_row_major_scan_backward()
*
* Purpose: Do a high locality sequence of inserts, protects, and
- * unprotects while scanning through the set of entries.
+ * unprotects while scanning through the set of entries.
* If pass is false on entry, do nothing.
*
* Return: void
@@ -2913,9 +2913,9 @@ hl_row_major_scan_backward(H5C_t * cache_ptr,
protect_entry(cache_ptr, type, i);
if ( verbose )
- HDfprintf(stdout, "(u, %d, %d) ", type, i);
+ HDfprintf(stdout, "(u, %d, %d) ", type, i);
- unprotect_entry(cache_ptr, type, i, NO_CHANGE,
+ unprotect_entry(cache_ptr, type, i, NO_CHANGE,
H5C__NO_FLAGS_SET);
}
i--;
@@ -3017,10 +3017,10 @@ col_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, (idx - lag));
- unprotect_entry(cache_ptr, type, idx - lag,
+ unprotect_entry(cache_ptr, type, idx - lag,
dirty_unprotects, H5C__NO_FLAGS_SET);
}
-
+
if ( verbose )
HDfprintf(stdout, "\n");
@@ -3043,7 +3043,7 @@ col_major_scan_forward(H5C_t * cache_ptr,
/*-------------------------------------------------------------------------
* Function: hl_col_major_scan_forward()
*
- * Purpose: Do a high locality sequence of inserts, protects, and
+ * Purpose: Do a high locality sequence of inserts, protects, and
* unprotects while scanning through the set of entries. If
* pass is false on entry, do nothing.
*
@@ -3135,10 +3135,10 @@ hl_col_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, i);
- unprotect_entry(cache_ptr, type, i,
+ unprotect_entry(cache_ptr, type, i,
dirty_unprotects, H5C__NO_FLAGS_SET);
}
-
+
if ( verbose )
HDfprintf(stdout, "\n");
@@ -3165,7 +3165,7 @@ hl_col_major_scan_forward(H5C_t * cache_ptr,
* Function: col_major_scan_backward()
*
* Purpose: Do a sequence of inserts, protects, and unprotects
- * while scanning backwards through the set of
+ * while scanning backwards through the set of
* entries. If pass is false on entry, do nothing.
*
* Return: void
@@ -3242,10 +3242,10 @@ col_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, (idx + lag));
- unprotect_entry(cache_ptr, type, idx + lag,
+ unprotect_entry(cache_ptr, type, idx + lag,
dirty_unprotects, H5C__NO_FLAGS_SET);
}
-
+
if ( verbose )
HDfprintf(stdout, "\n");
@@ -3274,8 +3274,8 @@ col_major_scan_backward(H5C_t * cache_ptr,
/*-------------------------------------------------------------------------
* Function: hl_col_major_scan_backward()
*
- * Purpose: Do a high locality sequence of inserts, protects, and
- * unprotects while scanning backwards through the set of
+ * Purpose: Do a high locality sequence of inserts, protects, and
+ * unprotects while scanning backwards through the set of
* entries. If pass is false on entry, do nothing.
*
* Return: void
@@ -3365,10 +3365,10 @@ hl_col_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, i);
- unprotect_entry(cache_ptr, type, i,
+ unprotect_entry(cache_ptr, type, i,
dirty_unprotects, H5C__NO_FLAGS_SET);
}
-
+
if ( verbose )
HDfprintf(stdout, "\n");
@@ -3400,8 +3400,8 @@ hl_col_major_scan_backward(H5C_t * cache_ptr,
/*-------------------------------------------------------------------------
* Function: smoke_check_1()
*
- * Purpose: A basic functional test, inserts, destroys, and renames in
- * the mix, along with repeated protects and unprotects.
+ * Purpose: A basic functional test, inserts, destroys, and renames in
+ * the mix, along with repeated protects and unprotects.
* All entries are marked as clean.
*
* Return: void
@@ -3445,20 +3445,20 @@ smoke_check_1(void)
pass = TRUE;
if ( show_progress ) /* 1 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
reset_entries();
if ( show_progress ) /* 2 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
cache_ptr = setup_cache((size_t)(4 * 1024 * 1024),
(size_t)(2 * 1024 * 1024));
if ( show_progress ) /* 3 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
row_major_scan_forward(/* cache_ptr */ cache_ptr,
@@ -3476,7 +3476,7 @@ smoke_check_1(void)
/* dirty_unprotects */ dirty_unprotects);
if ( show_progress ) /* 4 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
row_major_scan_backward(/* cache_ptr */ cache_ptr,
@@ -3494,7 +3494,7 @@ smoke_check_1(void)
/* dirty_unprotects */ dirty_unprotects);
if ( show_progress ) /* 5 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
row_major_scan_forward(/* cache_ptr */ cache_ptr,
@@ -3512,18 +3512,18 @@ smoke_check_1(void)
/* dirty_unprotects */ dirty_unprotects);
if ( show_progress ) /* 6 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
/* flush and destroy all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* cache_ptr */ cache_ptr,
/* destroy_entries */ TRUE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
if ( show_progress ) /* 7 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
col_major_scan_forward(/* cache_ptr */ cache_ptr,
@@ -3537,18 +3537,18 @@ smoke_check_1(void)
/* dirty_unprotects */ dirty_unprotects);
if ( show_progress ) /* 8 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
/* flush all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* cache_ptr */ cache_ptr,
/* destroy_entries */ FALSE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
if ( show_progress ) /* 9 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
col_major_scan_backward(/* cache_ptr */ cache_ptr,
@@ -3562,13 +3562,13 @@ smoke_check_1(void)
/* dirty_unprotects */ dirty_unprotects);
if ( show_progress ) /* 10 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
takedown_cache(cache_ptr, display_stats, TRUE);
if ( show_progress ) /* 11 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
verify_clean();
@@ -3577,7 +3577,7 @@ smoke_check_1(void)
if ( pass ) { PASSED(); } else { H5_FAILED(); }
if ( ! pass )
- HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
+ HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
fcn_name, failure_mssg);
} /* smoke_check_1() */
@@ -3586,9 +3586,9 @@ smoke_check_1(void)
/*-------------------------------------------------------------------------
* Function: smoke_check_2()
*
- * Purpose: A basic functional test, with inserts, destroys, and
- * renames in the mix, along with some repeated protects
- * and unprotects. About half the entries are marked as
+ * Purpose: A basic functional test, with inserts, destroys, and
+ * renames in the mix, along with some repeated protects
+ * and unprotects. About half the entries are marked as
* dirty.
*
* Return: void
@@ -3632,20 +3632,20 @@ smoke_check_2(void)
pass = TRUE;
if ( show_progress ) /* 1 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
reset_entries();
if ( show_progress ) /* 2 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
cache_ptr = setup_cache((size_t)(4 * 1024 * 1024),
(size_t)(2 * 1024 * 1024));
if ( show_progress ) /* 3 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
row_major_scan_forward(/* cache_ptr */ cache_ptr,
@@ -3663,7 +3663,7 @@ smoke_check_2(void)
/* dirty_unprotects */ dirty_unprotects);
if ( show_progress ) /* 4 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
row_major_scan_backward(/* cache_ptr */ cache_ptr,
@@ -3681,7 +3681,7 @@ smoke_check_2(void)
/* dirty_unprotects */ dirty_unprotects);
if ( show_progress ) /* 5 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
row_major_scan_forward(/* cache_ptr */ cache_ptr,
@@ -3699,18 +3699,18 @@ smoke_check_2(void)
/* dirty_unprotects */ dirty_unprotects);
if ( show_progress ) /* 6 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
/* flush and destroy all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* cache_ptr */ cache_ptr,
/* destroy_entries */ TRUE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
if ( show_progress ) /* 7 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
col_major_scan_forward(/* cache_ptr */ cache_ptr,
@@ -3724,18 +3724,18 @@ smoke_check_2(void)
/* dirty_unprotects */ dirty_unprotects);
if ( show_progress ) /* 8 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
/* flush all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* cache_ptr */ cache_ptr,
/* destroy_entries */ FALSE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
if ( show_progress ) /* 9 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
col_major_scan_backward(/* cache_ptr */ cache_ptr,
@@ -3749,13 +3749,13 @@ smoke_check_2(void)
/* dirty_unprotects */ dirty_unprotects);
if ( show_progress ) /* 10 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
takedown_cache(cache_ptr, display_stats, TRUE);
if ( show_progress ) /* 11 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
verify_clean();
@@ -3764,7 +3764,7 @@ smoke_check_2(void)
if ( pass ) { PASSED(); } else { H5_FAILED(); }
if ( ! pass )
- HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
+ HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
fcn_name, failure_mssg);
} /* smoke_check_2() */
@@ -3773,9 +3773,9 @@ smoke_check_2(void)
/*-------------------------------------------------------------------------
* Function: smoke_check_3()
*
- * Purpose: A basic functional test on a tiny cache, with inserts,
- * destroys, and renames in the mix, along with repeated
- * protects and unprotects. All entries are marked as clean.
+ * Purpose: A basic functional test on a tiny cache, with inserts,
+ * destroys, and renames in the mix, along with repeated
+ * protects and unprotects. All entries are marked as clean.
*
* Return: void
*
@@ -3818,20 +3818,20 @@ smoke_check_3(void)
pass = TRUE;
if ( show_progress ) /* 1 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
reset_entries();
if ( show_progress ) /* 2 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
cache_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
if ( show_progress ) /* 3 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
row_major_scan_forward(/* cache_ptr */ cache_ptr,
@@ -3849,7 +3849,7 @@ smoke_check_3(void)
/* dirty_unprotects */ dirty_unprotects);
if ( show_progress ) /* 4 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
row_major_scan_backward(/* cache_ptr */ cache_ptr,
@@ -3867,7 +3867,7 @@ smoke_check_3(void)
/* dirty_unprotects */ dirty_unprotects);
if ( show_progress ) /* 5 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
row_major_scan_forward(/* cache_ptr */ cache_ptr,
@@ -3885,18 +3885,18 @@ smoke_check_3(void)
/* dirty_unprotects */ dirty_unprotects);
if ( show_progress ) /* 6 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
/* flush and destroy all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* cache_ptr */ cache_ptr,
/* destroy_entries */ TRUE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
if ( show_progress ) /* 7 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
col_major_scan_forward(/* cache_ptr */ cache_ptr,
@@ -3910,18 +3910,18 @@ smoke_check_3(void)
/* dirty_unprotects */ dirty_unprotects);
if ( show_progress ) /* 8 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
/* flush all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* cache_ptr */ cache_ptr,
/* destroy_entries */ FALSE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
if ( show_progress ) /* 9 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
col_major_scan_backward(/* cache_ptr */ cache_ptr,
@@ -3935,13 +3935,13 @@ smoke_check_3(void)
/* dirty_unprotects */ dirty_unprotects);
if ( show_progress ) /* 10 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
takedown_cache(cache_ptr, display_stats, TRUE);
if ( show_progress ) /* 11 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
verify_clean();
@@ -3950,7 +3950,7 @@ smoke_check_3(void)
if ( pass ) { PASSED(); } else { H5_FAILED(); }
if ( ! pass )
- HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
+ HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
fcn_name, failure_mssg);
} /* smoke_check_3() */
@@ -3960,8 +3960,8 @@ smoke_check_3(void)
* Function: smoke_check_4()
*
* Purpose: A basic functional test on a tiny cache, with inserts,
- * destroys, and renames in the mix, along with repeated
- * protects and unprotects. About half the entries are
+ * destroys, and renames in the mix, along with repeated
+ * protects and unprotects. About half the entries are
* marked as dirty.
*
* Return: void
@@ -4005,20 +4005,20 @@ smoke_check_4(void)
pass = TRUE;
if ( show_progress ) /* 1 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
reset_entries();
if ( show_progress ) /* 2 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
cache_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
if ( show_progress ) /* 3 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
row_major_scan_forward(/* cache_ptr */ cache_ptr,
@@ -4036,7 +4036,7 @@ smoke_check_4(void)
/* dirty_unprotects */ dirty_unprotects);
if ( show_progress ) /* 4 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
row_major_scan_backward(/* cache_ptr */ cache_ptr,
@@ -4054,7 +4054,7 @@ smoke_check_4(void)
/* dirty_unprotects */ dirty_unprotects);
if ( show_progress ) /* 5 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
row_major_scan_forward(/* cache_ptr */ cache_ptr,
@@ -4072,18 +4072,18 @@ smoke_check_4(void)
/* dirty_unprotects */ dirty_unprotects);
if ( show_progress ) /* 6 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
/* flush and destroy all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* cache_ptr */ cache_ptr,
/* destroy_entries */ TRUE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
if ( show_progress ) /* 7 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
col_major_scan_forward(/* cache_ptr */ cache_ptr,
@@ -4097,18 +4097,18 @@ smoke_check_4(void)
/* dirty_unprotects */ dirty_unprotects);
if ( show_progress ) /* 8 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
/* flush all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* cache_ptr */ cache_ptr,
/* destroy_entries */ FALSE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
if ( show_progress ) /* 9 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
col_major_scan_backward(/* cache_ptr */ cache_ptr,
@@ -4122,13 +4122,13 @@ smoke_check_4(void)
/* dirty_unprotects */ dirty_unprotects);
if ( show_progress ) /* 10 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
takedown_cache(cache_ptr, display_stats, TRUE);
if ( show_progress ) /* 11 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
verify_clean();
@@ -4137,7 +4137,7 @@ smoke_check_4(void)
if ( pass ) { PASSED(); } else { H5_FAILED(); }
if ( ! pass )
- HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
+ HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
fcn_name, failure_mssg);
} /* smoke_check_4() */
@@ -4146,10 +4146,10 @@ smoke_check_4(void)
/*-------------------------------------------------------------------------
* Function: smoke_check_5()
*
- * Purpose: A basic functional test on a cache with automatic cache
- * resizing enabled, with inserts in the mix, along with
- * repeated protects and unprotects. All entries are marked
- * as clean.
+ * Purpose: A basic functional test on a cache with automatic cache
+ * resizing enabled, with inserts in the mix, along with
+ * repeated protects and unprotects. All entries are marked
+ * as clean.
*
* Return: void
*
@@ -4240,13 +4240,13 @@ smoke_check_5(void)
pass = TRUE;
if ( show_progress ) /* 1 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
reset_entries();
if ( show_progress ) /* 2 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
cache_ptr = setup_cache((size_t)(2 * 1024),
@@ -4264,7 +4264,7 @@ smoke_check_5(void)
}
if ( show_progress ) /* 3 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
hl_row_major_scan_forward(/* cache_ptr */ cache_ptr,
@@ -4277,7 +4277,7 @@ smoke_check_5(void)
/* dirty_inserts */ dirty_inserts);
if ( show_progress ) /* 4 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
hl_row_major_scan_backward(/* cache_ptr */ cache_ptr,
@@ -4290,7 +4290,7 @@ smoke_check_5(void)
/* dirty_inserts */ dirty_inserts);
if ( show_progress ) /* 5 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
hl_row_major_scan_forward(/* cache_ptr */ cache_ptr,
@@ -4303,18 +4303,18 @@ smoke_check_5(void)
/* dirty_inserts */ dirty_inserts);
if ( show_progress ) /* 6 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
/* flush and destroy all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* cache_ptr */ cache_ptr,
/* destroy_entries */ TRUE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
if ( show_progress ) /* 7 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
hl_col_major_scan_forward(/* cache_ptr */ cache_ptr,
@@ -4328,18 +4328,18 @@ smoke_check_5(void)
/* dirty_unprotects */ dirty_unprotects);
if ( show_progress ) /* 8 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
/* flush all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* cache_ptr */ cache_ptr,
/* destroy_entries */ FALSE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
if ( show_progress ) /* 9 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
hl_col_major_scan_backward(/* cache_ptr */ cache_ptr,
@@ -4353,13 +4353,13 @@ smoke_check_5(void)
/* dirty_unprotects */ dirty_unprotects);
if ( show_progress ) /* 10 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
takedown_cache(cache_ptr, display_stats, TRUE);
if ( show_progress ) /* 11 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
verify_clean();
@@ -4368,7 +4368,7 @@ smoke_check_5(void)
if ( pass ) { PASSED(); } else { H5_FAILED(); }
if ( ! pass )
- HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
+ HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
fcn_name, failure_mssg);
} /* smoke_check_5() */
@@ -4377,10 +4377,10 @@ smoke_check_5(void)
/*-------------------------------------------------------------------------
* Function: smoke_check_6()
*
- * Purpose: A basic functional test on a cache with automatic cache
- * resizing enabled, with inserts in the mix, along with
+ * Purpose: A basic functional test on a cache with automatic cache
+ * resizing enabled, with inserts in the mix, along with
* repeated protects and unprotects. About one half of all
- * entries are marked as dirty.
+ * entries are marked as dirty.
*
* Return: void
*
@@ -4471,13 +4471,13 @@ smoke_check_6(void)
}
if ( show_progress ) /* 1 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
reset_entries();
if ( show_progress ) /* 2 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
cache_ptr = setup_cache((size_t)(2 * 1024),
@@ -4495,7 +4495,7 @@ smoke_check_6(void)
}
if ( show_progress ) /* 3 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
hl_row_major_scan_forward(/* cache_ptr */ cache_ptr,
@@ -4508,7 +4508,7 @@ smoke_check_6(void)
/* dirty_inserts */ dirty_inserts);
if ( show_progress ) /* 4 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
hl_row_major_scan_backward(/* cache_ptr */ cache_ptr,
@@ -4521,7 +4521,7 @@ smoke_check_6(void)
/* dirty_inserts */ dirty_inserts);
if ( show_progress ) /* 5 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
hl_row_major_scan_forward(/* cache_ptr */ cache_ptr,
@@ -4534,18 +4534,18 @@ smoke_check_6(void)
/* dirty_inserts */ dirty_inserts);
if ( show_progress ) /* 6 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
/* flush and destroy all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* cache_ptr */ cache_ptr,
/* destroy_entries */ TRUE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
if ( show_progress ) /* 7 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
hl_col_major_scan_forward(/* cache_ptr */ cache_ptr,
@@ -4559,18 +4559,18 @@ smoke_check_6(void)
/* dirty_unprotects */ dirty_unprotects);
if ( show_progress ) /* 8 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
/* flush all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* cache_ptr */ cache_ptr,
/* destroy_entries */ FALSE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
if ( show_progress ) /* 9 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
hl_col_major_scan_backward(/* cache_ptr */ cache_ptr,
@@ -4584,13 +4584,13 @@ smoke_check_6(void)
/* dirty_unprotects */ dirty_unprotects);
if ( show_progress ) /* 10 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
takedown_cache(cache_ptr, display_stats, TRUE);
if ( show_progress ) /* 11 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
verify_clean();
@@ -4599,7 +4599,7 @@ smoke_check_6(void)
if ( pass ) { PASSED(); } else { H5_FAILED(); }
if ( ! pass )
- HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
+ HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
fcn_name, failure_mssg);
} /* smoke_check_6() */
@@ -4608,10 +4608,10 @@ smoke_check_6(void)
/*-------------------------------------------------------------------------
* Function: smoke_check_7()
*
- * Purpose: A basic functional test on a cache with automatic cache
- * resizing enabled, with inserts in the mix, along with
- * repeated protects and unprotects. All entries are marked
- * as clean.
+ * Purpose: A basic functional test on a cache with automatic cache
+ * resizing enabled, with inserts in the mix, along with
+ * repeated protects and unprotects. All entries are marked
+ * as clean.
*
* Return: void
*
@@ -4668,7 +4668,7 @@ smoke_check_7(void)
/* size_t max_increment = */ (8 * 1024 * 1024),
- /* enum H5C_cache_decr_mode decr_mode = */
+ /* enum H5C_cache_decr_mode decr_mode = */
H5C_decr__age_out_with_threshold,
/* double upper_hr_threshold = */ 0.995,
@@ -4703,13 +4703,13 @@ smoke_check_7(void)
pass = TRUE;
if ( show_progress ) /* 1 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
reset_entries();
if ( show_progress ) /* 2 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
cache_ptr = setup_cache((size_t)(2 * 1024),
@@ -4727,7 +4727,7 @@ smoke_check_7(void)
}
if ( show_progress ) /* 3 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
hl_row_major_scan_forward(/* cache_ptr */ cache_ptr,
@@ -4740,7 +4740,7 @@ smoke_check_7(void)
/* dirty_inserts */ dirty_inserts);
if ( show_progress ) /* 4 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
hl_row_major_scan_backward(/* cache_ptr */ cache_ptr,
@@ -4753,7 +4753,7 @@ smoke_check_7(void)
/* dirty_inserts */ dirty_inserts);
if ( show_progress ) /* 5 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
hl_row_major_scan_forward(/* cache_ptr */ cache_ptr,
@@ -4766,18 +4766,18 @@ smoke_check_7(void)
/* dirty_inserts */ dirty_inserts);
if ( show_progress ) /* 6 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
/* flush and destroy all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* cache_ptr */ cache_ptr,
/* destroy_entries */ TRUE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
if ( show_progress ) /* 7 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
hl_col_major_scan_forward(/* cache_ptr */ cache_ptr,
@@ -4791,18 +4791,18 @@ smoke_check_7(void)
/* dirty_unprotects */ dirty_unprotects);
if ( show_progress ) /* 8 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
/* flush all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* cache_ptr */ cache_ptr,
/* destroy_entries */ FALSE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
if ( show_progress ) /* 9 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
hl_col_major_scan_backward(/* cache_ptr */ cache_ptr,
@@ -4816,13 +4816,13 @@ smoke_check_7(void)
/* dirty_unprotects */ dirty_unprotects);
if ( show_progress ) /* 10 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
takedown_cache(cache_ptr, display_stats, TRUE);
if ( show_progress ) /* 11 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
verify_clean();
@@ -4831,7 +4831,7 @@ smoke_check_7(void)
if ( pass ) { PASSED(); } else { H5_FAILED(); }
if ( ! pass )
- HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
+ HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
fcn_name, failure_mssg);
} /* smoke_check_7() */
@@ -4840,10 +4840,10 @@ smoke_check_7(void)
/*-------------------------------------------------------------------------
* Function: smoke_check_8()
*
- * Purpose: A basic functional test on a cache with automatic cache
- * resizing enabled, with inserts in the mix, along with
+ * Purpose: A basic functional test on a cache with automatic cache
+ * resizing enabled, with inserts in the mix, along with
* repeated protects and unprotects. About one half of all
- * entries are marked as dirty.
+ * entries are marked as dirty.
*
* Return: void
*
@@ -4900,7 +4900,7 @@ smoke_check_8(void)
/* size_t max_increment = */ (4 * 1024 * 1024),
- /* enum H5C_cache_decr_mode decr_mode = */
+ /* enum H5C_cache_decr_mode decr_mode = */
H5C_decr__age_out_with_threshold,
/* double upper_hr_threshold = */ 0.995,
@@ -4935,13 +4935,13 @@ smoke_check_8(void)
pass = TRUE;
if ( show_progress ) /* 1 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
reset_entries();
if ( show_progress ) /* 2 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
cache_ptr = setup_cache((size_t)(2 * 1024),
@@ -4959,7 +4959,7 @@ smoke_check_8(void)
}
if ( show_progress ) /* 3 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
hl_row_major_scan_forward(/* cache_ptr */ cache_ptr,
@@ -4972,7 +4972,7 @@ smoke_check_8(void)
/* dirty_inserts */ dirty_inserts);
if ( show_progress ) /* 4 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
hl_row_major_scan_backward(/* cache_ptr */ cache_ptr,
@@ -4985,7 +4985,7 @@ smoke_check_8(void)
/* dirty_inserts */ dirty_inserts);
if ( show_progress ) /* 5 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
hl_row_major_scan_forward(/* cache_ptr */ cache_ptr,
@@ -4998,18 +4998,18 @@ smoke_check_8(void)
/* dirty_inserts */ dirty_inserts);
if ( show_progress ) /* 6 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
/* flush and destroy all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* cache_ptr */ cache_ptr,
/* destroy_entries */ TRUE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
if ( show_progress ) /* 7 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
hl_col_major_scan_forward(/* cache_ptr */ cache_ptr,
@@ -5023,18 +5023,18 @@ smoke_check_8(void)
/* dirty_unprotects */ dirty_unprotects);
if ( show_progress ) /* 8 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
/* flush all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* cache_ptr */ cache_ptr,
/* destroy_entries */ FALSE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
if ( show_progress ) /* 9 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
hl_col_major_scan_backward(/* cache_ptr */ cache_ptr,
@@ -5048,13 +5048,13 @@ smoke_check_8(void)
/* dirty_unprotects */ dirty_unprotects);
if ( show_progress ) /* 10 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
takedown_cache(cache_ptr, display_stats, TRUE);
if ( show_progress ) /* 11 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
verify_clean();
@@ -5063,7 +5063,7 @@ smoke_check_8(void)
if ( pass ) { PASSED(); } else { H5_FAILED(); }
if ( ! pass )
- HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
+ HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
fcn_name, failure_mssg);
} /* smoke_check_8() */
@@ -5073,8 +5073,8 @@ smoke_check_8(void)
* Function: write_permitted_check()
*
* Purpose: A basic test of the write permitted function. In essence,
- * we load the cache up with dirty entryies, set
- * write_permitted to FALSE, and then protect a bunch of
+ * we load the cache up with dirty entryies, set
+ * write_permitted to FALSE, and then protect a bunch of
* entries. If there are any writes while write_permitted is
* FALSE, the test will fail.
*
@@ -5110,20 +5110,20 @@ write_permitted_check(void)
pass = TRUE;
if ( show_progress ) /* 1 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
reset_entries();
if ( show_progress ) /* 2 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
cache_ptr = setup_cache((size_t)(1 * 1024 * 1024),
(size_t)(0));
if ( show_progress ) /* 3 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
row_major_scan_forward(/* cache_ptr */ cache_ptr,
@@ -5141,7 +5141,7 @@ write_permitted_check(void)
/* dirty_unprotects */ TRUE);
if ( show_progress ) /* 4 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
write_permitted = FALSE;
@@ -5161,7 +5161,7 @@ write_permitted_check(void)
/* dirty_unprotects */ NO_CHANGE);
if ( show_progress ) /* 5 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
write_permitted = TRUE;
@@ -5181,18 +5181,18 @@ write_permitted_check(void)
/* dirty_unprotects */ TRUE);
if ( show_progress ) /* 6 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
/* flush and destroy all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* cache_ptr */ cache_ptr,
/* destroy_entries */ TRUE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
if ( show_progress ) /* 7 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
col_major_scan_forward(/* cache_ptr */ cache_ptr,
@@ -5206,7 +5206,7 @@ write_permitted_check(void)
/* dirty_unprotects */ TRUE);
if ( show_progress ) /* 8 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
write_permitted = FALSE;
@@ -5224,13 +5224,13 @@ write_permitted_check(void)
write_permitted = TRUE;
if ( show_progress ) /* 9 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
takedown_cache(cache_ptr, display_stats, TRUE);
if ( show_progress ) /* 10 */
- HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
verify_clean();
@@ -5239,7 +5239,7 @@ write_permitted_check(void)
if ( pass ) { PASSED(); } else { H5_FAILED(); }
if ( ! pass )
- HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
+ HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
fcn_name, failure_mssg);
#else /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
@@ -5280,7 +5280,7 @@ check_flush_cache(void)
pass = TRUE;
/* allocate a cache, and flush it under various circumstances.
- * To the extent possible, verify that the desired actions took
+ * To the extent possible, verify that the desired actions took
* place.
*/
@@ -5323,7 +5323,7 @@ check_flush_cache(void)
if ( pass ) { PASSED(); } else { H5_FAILED(); }
if ( ! pass )
- HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
+ HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
fcn_name, failure_mssg);
} /* check_flush_cache() */
@@ -5381,7 +5381,7 @@ check_flush_cache__empty_cache(H5C_t * cache_ptr)
if ( pass ) {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr,
+ result = H5C_flush_cache(NULL, -1, -1, cache_ptr,
H5C__FLUSH_INVALIDATE_FLAG);
if ( result < 0 ) {
@@ -5393,7 +5393,7 @@ check_flush_cache__empty_cache(H5C_t * cache_ptr)
if ( pass ) {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr,
+ result = H5C_flush_cache(NULL, -1, -1, cache_ptr,
H5C__FLUSH_CLEAR_ONLY_FLAG);
if ( result < 0 ) {
@@ -5406,7 +5406,7 @@ check_flush_cache__empty_cache(H5C_t * cache_ptr)
if ( pass ) {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr,
+ result = H5C_flush_cache(NULL, -1, -1, cache_ptr,
H5C__FLUSH_MARKED_ENTRIES_FLAG);
if ( result < 0 ) {
@@ -6533,7 +6533,7 @@ check_flush_cache__multi_entry_test(H5C_t * cache_ptr,
{
if ( spec[i].insert_flag ) {
- insert_entry(cache_ptr, spec[i].entry_type, spec[i].entry_index,
+ insert_entry(cache_ptr, spec[i].entry_type, spec[i].entry_index,
spec[i].dirty_flag, spec[i].flags);
} else {
@@ -6545,7 +6545,7 @@ check_flush_cache__multi_entry_test(H5C_t * cache_ptr,
}
total_entry_size += entry_sizes[spec[i].entry_type];
-
+
i++;
}
@@ -6576,7 +6576,7 @@ check_flush_cache__multi_entry_test(H5C_t * cache_ptr,
#if 0 /* This is useful debugging code. Lets keep it around. */
- HDfprintf(stdout,
+ HDfprintf(stdout,
"loaded = %d(%d), clrd = %d(%d), flshd = %d(%d), dest = %d(%d)\n",
(int)(entry_ptr->loaded),
(int)(spec[i].expected_loaded),
@@ -6600,14 +6600,14 @@ check_flush_cache__multi_entry_test(H5C_t * cache_ptr,
if ( pass ) {
- if ( ( ( (flush_flags & H5C__FLUSH_INVALIDATE_FLAG) == 0 )
+ if ( ( ( (flush_flags & H5C__FLUSH_INVALIDATE_FLAG) == 0 )
&&
- ( ( cache_ptr->index_len != spec_size )
+ ( ( cache_ptr->index_len != spec_size )
||
- ( cache_ptr->index_size != total_entry_size )
+ ( cache_ptr->index_size != total_entry_size )
)
)
- ||
+ ||
( ( (flush_flags & H5C__FLUSH_INVALIDATE_FLAG) != 0 )
&&
( ( cache_ptr->index_len != 0 )
@@ -6625,10 +6625,10 @@ check_flush_cache__multi_entry_test(H5C_t * cache_ptr,
}
}
- /* clean up the cache to prep for the next test */
+ /* clean up the cache to prep for the next test */
if ( pass ) {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr,
+ result = H5C_flush_cache(NULL, -1, -1, cache_ptr,
H5C__FLUSH_INVALIDATE_FLAG);
if ( result < 0 ) {
@@ -6648,7 +6648,7 @@ check_flush_cache__multi_entry_test(H5C_t * cache_ptr,
test_num);
failure_mssg = msg;
- }
+ }
}
i = 0;
@@ -6864,7 +6864,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
/* insert_flag */ FALSE,
/* dirty_flag */ FALSE,
/* flags */ H5C__NO_FLAGS_SET,
- /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG |
+ /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG |
H5C__FLUSH_CLEAR_ONLY_FLAG,
/* expected_loaded */ TRUE,
/* expected_cleared */ TRUE,
@@ -6984,7 +6984,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
/* insert_flag */ FALSE,
/* dirty_flag */ FALSE,
/* flags */ H5C__NO_FLAGS_SET,
- /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG |
+ /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG |
H5C__FLUSH_CLEAR_ONLY_FLAG |
H5C__FLUSH_MARKED_ENTRIES_FLAG,
/* expected_loaded */ TRUE,
@@ -7178,7 +7178,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
/* insert_flag */ FALSE,
/* dirty_flag */ FALSE,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
- /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG |
+ /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG |
H5C__FLUSH_CLEAR_ONLY_FLAG,
/* expected_loaded */ TRUE,
/* expected_cleared */ TRUE,
@@ -7298,7 +7298,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
/* insert_flag */ FALSE,
/* dirty_flag */ FALSE,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
- /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG |
+ /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG |
H5C__FLUSH_CLEAR_ONLY_FLAG |
H5C__FLUSH_MARKED_ENTRIES_FLAG,
/* expected_loaded */ TRUE,
@@ -7492,7 +7492,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
/* insert_flag */ TRUE,
/* dirty_flag */ FALSE,
/* flags */ H5C__NO_FLAGS_SET,
- /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG |
+ /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG |
H5C__FLUSH_CLEAR_ONLY_FLAG,
/* expected_loaded */ FALSE,
/* expected_cleared */ TRUE,
@@ -7612,7 +7612,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
/* insert_flag */ TRUE,
/* dirty_flag */ FALSE,
/* flags */ H5C__NO_FLAGS_SET,
- /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG |
+ /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG |
H5C__FLUSH_CLEAR_ONLY_FLAG |
H5C__FLUSH_MARKED_ENTRIES_FLAG,
/* expected_loaded */ FALSE,
@@ -7806,7 +7806,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
/* insert_flag */ TRUE,
/* dirty_flag */ FALSE,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
- /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG |
+ /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG |
H5C__FLUSH_CLEAR_ONLY_FLAG,
/* expected_loaded */ FALSE,
/* expected_cleared */ TRUE,
@@ -7926,7 +7926,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
/* insert_flag */ TRUE,
/* dirty_flag */ FALSE,
/* flags */ H5C__SET_FLUSH_MARKER_FLAG,
- /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG |
+ /* flush_flags */ H5C__FLUSH_INVALIDATE_FLAG |
H5C__FLUSH_CLEAR_ONLY_FLAG |
H5C__FLUSH_MARKED_ENTRIES_FLAG,
/* expected_loaded */ FALSE,
@@ -8035,7 +8035,7 @@ check_flush_cache__single_entry_test(H5C_t * cache_ptr,
protect_entry(cache_ptr, entry_type, entry_idx);
- unprotect_entry(cache_ptr, entry_type, entry_idx,
+ unprotect_entry(cache_ptr, entry_type, entry_idx,
(int)dirty_flag, flags);
}
}
@@ -8057,7 +8057,7 @@ check_flush_cache__single_entry_test(H5C_t * cache_ptr,
( entry_ptr->flushed != expected_flushed ) ||
( entry_ptr->destroyed != expected_destroyed ) ) {
- HDfprintf(stdout,
+ HDfprintf(stdout,
"loaded = %d(%d), clrd = %d(%d), flshd = %d(%d), dest = %d(%d)\n",
(int)(entry_ptr->loaded),
(int)expected_loaded,
@@ -8074,14 +8074,14 @@ check_flush_cache__single_entry_test(H5C_t * cache_ptr,
test_num);
failure_mssg = msg;
}
- else if ( ( ( (flush_flags & H5C__FLUSH_INVALIDATE_FLAG) == 0 )
+ else if ( ( ( (flush_flags & H5C__FLUSH_INVALIDATE_FLAG) == 0 )
&&
- ( ( cache_ptr->index_len != 1 )
+ ( ( cache_ptr->index_len != 1 )
||
- ( cache_ptr->index_size != entry_sizes[entry_type] )
- )
+ ( cache_ptr->index_size != entry_sizes[entry_type] )
+ )
)
- ||
+ ||
( ( (flush_flags & H5C__FLUSH_INVALIDATE_FLAG) != 0 )
&&
( ( cache_ptr->index_len != 0 )
@@ -8098,12 +8098,12 @@ check_flush_cache__single_entry_test(H5C_t * cache_ptr,
failure_mssg = msg;
}
}
-
-
- /* clean up the cache to prep for the next test */
+
+
+ /* clean up the cache to prep for the next test */
if ( pass ) {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr,
+ result = H5C_flush_cache(NULL, -1, -1, cache_ptr,
H5C__FLUSH_INVALIDATE_FLAG);
if ( result < 0 ) {
@@ -8184,7 +8184,7 @@ check_flush_protected_err(void)
unprotect_entry(cache_ptr, 0, 0, TRUE, H5C__NO_FLAGS_SET);
- if ( H5C_flush_cache(NULL, -1, -1, cache_ptr, H5C__NO_FLAGS_SET)
+ if ( H5C_flush_cache(NULL, -1, -1, cache_ptr, H5C__NO_FLAGS_SET)
< 0 ) {
pass = FALSE;
@@ -8200,7 +8200,7 @@ check_flush_protected_err(void)
if ( pass ) { PASSED(); } else { H5_FAILED(); }
if ( ! pass )
- HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
+ HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
fcn_name, failure_mssg);
} /* check_flush_protected_err() */
@@ -8260,14 +8260,14 @@ check_destroy_protected_err(void)
pass = FALSE;
failure_mssg = "destroy failed after unprotect.\n";
- }
+ }
}
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
if ( ! pass )
- HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
+ HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
fcn_name, failure_mssg);
} /* check_destroy_protected_err() */
@@ -8276,7 +8276,7 @@ check_destroy_protected_err(void)
/*-------------------------------------------------------------------------
* Function: check_duplicate_insert_err()
*
- * Purpose: Verify that an attempt to insert and entry that is
+ * Purpose: Verify that an attempt to insert and entry that is
* alread in the cache will generate an error.
*
* Return: void
@@ -8303,7 +8303,7 @@ check_duplicate_insert_err(void)
pass = TRUE;
/* allocate a cache, protect an entry, and then try to insert
- * the entry again. This should fail. Unprotect the entry and
+ * the entry again. This should fail. Unprotect the entry and
* destroy the cache -- should succeed.
*/
@@ -8321,7 +8321,7 @@ check_duplicate_insert_err(void)
base_addr = entries[0];
entry_ptr = &(base_addr[0]);
- result = H5C_insert_entry(NULL, -1, -1, cache_ptr,
+ result = H5C_insert_entry(NULL, -1, -1, cache_ptr,
&(types[0]), entry_ptr->addr,
(void *)entry_ptr, H5C__NO_FLAGS_SET);
@@ -8342,7 +8342,7 @@ check_duplicate_insert_err(void)
if ( pass ) { PASSED(); } else { H5_FAILED(); }
if ( ! pass )
- HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
+ HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n",
fcn_name, failure_mssg);
} /* check_duplicate_insert_err() */
@@ -8431,7 +8431,7 @@ check_rename_err(void)
if ( pass ) { PASSED(); } else { H5_FAILED(); }
if ( ! pass )
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
+ HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
fcn_name, failure_mssg);
} /* check_rename_err() */
@@ -8466,7 +8466,7 @@ check_double_protect_err(void)
pass = TRUE;
/* allocate a cache, protect an entry, and then try to protect
- * the entry again. This should fail. Unprotect the entry and
+ * the entry again. This should fail. Unprotect the entry and
* destroy the cache -- should succeed.
*/
@@ -8507,7 +8507,7 @@ check_double_protect_err(void)
if ( pass ) { PASSED(); } else { H5_FAILED(); }
if ( ! pass )
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
+ HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
fcn_name, failure_mssg);
} /* check_double_protect_err() */
@@ -8527,7 +8527,7 @@ check_double_protect_err(void)
* Modifications:
*
* JRM -- 6/17/05
- * Modified function to use the new dirtied parameter in
+ * Modified function to use the new dirtied parameter in
* H5C_unprotect().
*
*-------------------------------------------------------------------------
@@ -8545,8 +8545,8 @@ check_double_unprotect_err(void)
pass = TRUE;
- /* allocate a cache, protect an entry, unprotect it, and then try to
- * unprotect the entry again. This should fail. Destroy the cache
+ /* allocate a cache, protect an entry, unprotect it, and then try to
+ * unprotect the entry again. This should fail. Destroy the cache
* -- should succeed.
*/
@@ -8567,13 +8567,13 @@ check_double_unprotect_err(void)
if ( pass ) {
result = H5C_unprotect(NULL, -1, -1, cache_ptr, &(types[0]),
- entry_ptr->addr, (void *)entry_ptr,
+ entry_ptr->addr, (void *)entry_ptr,
H5C__NO_FLAGS_SET);
if ( result > 0 ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"attempt to unprotect an unprotected entry succeeded 1.\n";
}
}
@@ -8586,7 +8586,7 @@ check_double_unprotect_err(void)
if ( pass ) { PASSED(); } else { H5_FAILED(); }
if ( ! pass )
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
+ HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
fcn_name, failure_mssg);
} /* check_double_unprotect_err() */
@@ -8596,8 +8596,8 @@ check_double_unprotect_err(void)
* Function: check_auto_cache_resize()
*
* Purpose: Exercise the automatic cache resizing functionality.
- * The objective is to operate the auto-resize code in
- * all possible modes. Unfortunately, there are quite
+ * The objective is to operate the auto-resize code in
+ * all possible modes. Unfortunately, there are quite
* a few of them.
*
* Return: void
@@ -8691,7 +8691,7 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* allocate a cache, enable automatic cache resizing, and then force
+ /* allocate a cache, enable automatic cache resizing, and then force
* the cache through all its operational modes. Verify that all
* performs as expected.
*/
@@ -8727,7 +8727,7 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* force low hit rate with cache not full -- should result in not
+ /* force low hit rate with cache not full -- should result in not
* full status.
*/
if ( pass ) {
@@ -8739,7 +8739,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, PICO_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, PICO_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, PICO_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -8769,7 +8769,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -8787,7 +8787,7 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* force low hit rate with cache not full -- should result in not
+ /* force low hit rate with cache not full -- should result in not
* full status.
*/
if ( pass ) {
@@ -8799,7 +8799,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, PICO_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, PICO_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, PICO_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -8829,7 +8829,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -8859,7 +8859,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -8889,7 +8889,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -8920,7 +8920,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -8950,7 +8950,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -8968,7 +8968,7 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* force low hit rate with cache full and at maximum size -- should
+ /* force low hit rate with cache full and at maximum size -- should
* in no change in size and a result of at_max_size.
*/
if ( pass ) {
@@ -8980,7 +8980,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -8998,7 +8998,7 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* force high hit rate with cache full and at maximum size -- should
+ /* force high hit rate with cache full and at maximum size -- should
* result in a decrease from 14 to 13 Meg -- note that max decrease
* reduced the size of the reduction
*/
@@ -9011,7 +9011,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -9030,7 +9030,7 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* the current cache configuration is unconvenient for testing cache
- * size reduction, so lets change it some something easier to work
+ * size reduction, so lets change it some something easier to work
* with.
*/
@@ -9095,7 +9095,7 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* force high hit rate -- should result in a decrease from ~4 to ~3
+ /* force high hit rate -- should result in a decrease from ~4 to ~3
* M -- note that max decrease reduces the size of the reduction
*/
if ( pass ) {
@@ -9107,7 +9107,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -9125,8 +9125,8 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* force high hit rate again -- should result in a decrease from ~3
- * to ~2 M -- again note that max decrease reduces the size of the
+ /* force high hit rate again -- should result in a decrease from ~3
+ * to ~2 M -- again note that max decrease reduces the size of the
* reduction.
*/
if ( pass ) {
@@ -9138,7 +9138,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -9156,8 +9156,8 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* force high hit rate again -- should result in a decrease from ~2
- * to ~1 M -- again note that max decrease reduces the size of the
+ /* force high hit rate again -- should result in a decrease from ~2
+ * to ~1 M -- again note that max decrease reduces the size of the
* reduction, but only by five bites.
*/
if ( pass ) {
@@ -9169,7 +9169,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -9187,7 +9187,7 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* force high hit rate again -- should result in a decrease from ~1
+ /* force high hit rate again -- should result in a decrease from ~1
* to ~0.5 M -- max decrease is no longer a factor. New size is five
* bytes above the minimum.
*/
@@ -9200,7 +9200,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -9230,7 +9230,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -9260,7 +9260,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -9278,7 +9278,7 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* force in range hit rate -- should be no change in cache size,
+ /* force in range hit rate -- should be no change in cache size,
* and result should be in_spec.
*/
if ( pass ) {
@@ -9290,18 +9290,18 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
}
- while ( ( pass ) && ( i < 1000 ) )
+ while ( ( pass ) && ( i < 1000 ) )
{
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i + 1000);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i + 1000,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i + 1000,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -9319,7 +9319,7 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* force low hit rate with cache full -- should
+ /* force low hit rate with cache full -- should
* increase cache size from .5 to 1 M.
*/
if ( pass ) {
@@ -9331,7 +9331,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -9349,7 +9349,7 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* force high hit rate -- should result in a decrease to the
+ /* force high hit rate -- should result in a decrease to the
* minimum cache size.
*/
if ( pass ) {
@@ -9361,7 +9361,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -9445,7 +9445,7 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* force high hit rate -- should result in a decrease to the
+ /* force high hit rate -- should result in a decrease to the
* minimum cache size.
*/
if ( pass ) {
@@ -9457,7 +9457,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -9475,7 +9475,7 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* force low hit rate with cache full -- should increase cache size
+ /* force low hit rate with cache full -- should increase cache size
* from 1 to 4 Meg.
*/
if ( pass ) {
@@ -9487,7 +9487,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -9505,7 +9505,7 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* force low hit rate again with cache full -- should increase cache
+ /* force low hit rate again with cache full -- should increase cache
* size from 4 to 16 Meg.
*/
if ( pass ) {
@@ -9517,7 +9517,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -9547,7 +9547,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -9566,7 +9566,7 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
/******************************************************************
- * We have tested the threshold increment and decrement modes.
+ * We have tested the threshold increment and decrement modes.
* must now test the ageout decrement mode.
*
* Reconfigure the cache for this testing.
@@ -9638,7 +9638,7 @@ check_auto_cache_resize(void)
* for three epochs while the markers are inserted into the cache
*
* Note that hit rate will be zero, so the cache will attempt to
- * increase its size. Since we are already at max size, it will
+ * increase its size. Since we are already at max size, it will
* not be able to.
*/
if ( pass ) { /* first epoch */
@@ -9650,7 +9650,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -9677,7 +9677,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -9704,7 +9704,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -9723,10 +9723,10 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* fourth epoch -- If the hit rate were above the lower threshold,
- * we would see cache size reduction now. However, nothing will
+ * we would see cache size reduction now. However, nothing will
* happen until we get the hit rate above the lower threshold.
*/
- if ( pass ) {
+ if ( pass ) {
rpt_fcn_called = FALSE;
i = 3000;
@@ -9735,7 +9735,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -9753,10 +9753,10 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* fifth epoch -- force the hit rate to 100%. We should see cache size
- * reduction now.
+ /* fifth epoch -- force the hit rate to 100%. We should see cache size
+ * reduction now.
*/
- if ( pass ) {
+ if ( pass ) {
rpt_fcn_called = FALSE;
i = 3000;
@@ -9765,7 +9765,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -9783,9 +9783,9 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* sixth epoch -- force the hit rate to 100% again.
+ /* sixth epoch -- force the hit rate to 100% again.
*/
- if ( pass ) {
+ if ( pass ) {
rpt_fcn_called = FALSE;
i = 3000;
@@ -9794,7 +9794,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -9812,9 +9812,9 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* seventh epoch -- force the hit rate to 100% again.
+ /* seventh epoch -- force the hit rate to 100% again.
*/
- if ( pass ) {
+ if ( pass ) {
rpt_fcn_called = FALSE;
i = 3000;
@@ -9823,7 +9823,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -9841,10 +9841,10 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* eigth epoch -- force the hit rate to 100% again -- should be steady
- * state.
+ /* eigth epoch -- force the hit rate to 100% again -- should be steady
+ * state.
*/
- if ( pass ) {
+ if ( pass ) {
rpt_fcn_called = FALSE;
i = 3000;
@@ -9853,7 +9853,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -9871,7 +9871,7 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "*check point %d\n", checkpoint++);
- /* now just bang on one entry -- after three epochs, this should
+ /* now just bang on one entry -- after three epochs, this should
* get all entries other than the one evicted, and the cache size
* should be decreased to the minimum.
*/
@@ -9884,7 +9884,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -9911,7 +9911,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -9938,7 +9938,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -9949,7 +9949,7 @@ check_auto_cache_resize(void)
( cache_ptr->max_cache_size != (512 * 1024) ) ||
( cache_ptr->min_clean_size != (256 * 1024) ) ||
( cache_ptr->index_len != 2 ) ||
- ( cache_ptr->index_size !=
+ ( cache_ptr->index_size !=
MONSTER_ENTRY_SIZE + MEDIUM_ENTRY_SIZE ) ) {
pass = FALSE;
@@ -9968,7 +9968,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -9979,7 +9979,7 @@ check_auto_cache_resize(void)
( cache_ptr->max_cache_size != (512 * 1024) ) ||
( cache_ptr->min_clean_size != (256 * 1024) ) ||
( cache_ptr->index_len != 2 ) ||
- ( cache_ptr->index_size !=
+ ( cache_ptr->index_size !=
MONSTER_ENTRY_SIZE + MEDIUM_ENTRY_SIZE ) ) {
pass = FALSE;
@@ -10061,7 +10061,7 @@ check_auto_cache_resize(void)
* for three epochs while the markers are inserted into the cache
*
* Note that hit rate will be zero, so the cache will attempt to
- * increase its size. Since we are already at max size, it will
+ * increase its size. Since we are already at max size, it will
* not be able to.
*/
if ( pass ) { /* first epoch */
@@ -10073,7 +10073,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -10100,7 +10100,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -10127,7 +10127,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -10146,10 +10146,10 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* fourth epoch -- If the hit rate were above the lower threshold,
- * we would see cache size reduction now. However, nothing will
+ * we would see cache size reduction now. However, nothing will
* happen until we get the hit rate above the lower threshold.
*/
- if ( pass ) {
+ if ( pass ) {
rpt_fcn_called = FALSE;
i = 3000;
@@ -10158,7 +10158,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -10176,10 +10176,10 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* fifth epoch -- force the hit rate to 100%. We should see cache size
- * reduction now.
+ /* fifth epoch -- force the hit rate to 100%. We should see cache size
+ * reduction now.
*/
- if ( pass ) {
+ if ( pass ) {
rpt_fcn_called = FALSE;
i = 3000;
@@ -10188,7 +10188,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -10206,9 +10206,9 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* sixth epoch -- force the hit rate to 100% again.
+ /* sixth epoch -- force the hit rate to 100% again.
*/
- if ( pass ) {
+ if ( pass ) {
rpt_fcn_called = FALSE;
i = 2000;
@@ -10217,7 +10217,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -10237,7 +10237,7 @@ check_auto_cache_resize(void)
/* seventh epoch -- keep hit rate at 100%, and keep 2K entries active.
*/
- if ( pass ) {
+ if ( pass ) {
rpt_fcn_called = FALSE;
i = 3000;
@@ -10246,7 +10246,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -10266,7 +10266,7 @@ check_auto_cache_resize(void)
/* eigth epoch -- still 100% hit rate
*/
- if ( pass ) {
+ if ( pass ) {
rpt_fcn_called = FALSE;
i = 2000;
@@ -10275,7 +10275,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -10295,7 +10295,7 @@ check_auto_cache_resize(void)
/* ninth epoch --hit rate at 100%.
*/
- if ( pass ) {
+ if ( pass ) {
rpt_fcn_called = FALSE;
i = 3000;
@@ -10304,7 +10304,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -10324,7 +10324,7 @@ check_auto_cache_resize(void)
/* tenth epoch -- still 100% hit rate
*/
- if ( pass ) {
+ if ( pass ) {
rpt_fcn_called = FALSE;
i = 2000;
@@ -10333,7 +10333,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -10353,7 +10353,7 @@ check_auto_cache_resize(void)
/* eleventh epoch -- hit rate at 100% -- starting to stableize
*/
- if ( pass ) {
+ if ( pass ) {
rpt_fcn_called = FALSE;
i = 3000;
@@ -10362,7 +10362,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -10380,10 +10380,10 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* twelth epoch -- force the hit rate to 100% again -- should be steady
- * state.
+ /* twelth epoch -- force the hit rate to 100% again -- should be steady
+ * state.
*/
- if ( pass ) {
+ if ( pass ) {
rpt_fcn_called = FALSE;
i = 2000;
@@ -10392,7 +10392,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -10410,7 +10410,7 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* now just bang on one entry -- after three epochs, this should
+ /* now just bang on one entry -- after three epochs, this should
* get all entries other than the one evicted, and the cache size
* should be decreased to the minimum.
*/
@@ -10423,7 +10423,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -10450,7 +10450,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -10458,9 +10458,9 @@ check_auto_cache_resize(void)
if ( ( ! rpt_fcn_called ) ||
( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size !=
+ ( cache_ptr->max_cache_size !=
(1001 * 1024 + MONSTER_ENTRY_SIZE) ) ||
- ( cache_ptr->min_clean_size !=
+ ( cache_ptr->min_clean_size !=
(1001 * 512 + MONSTER_ENTRY_SIZE / 2) ) ) {
pass = FALSE;
@@ -10479,7 +10479,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -10490,7 +10490,7 @@ check_auto_cache_resize(void)
( cache_ptr->max_cache_size != (512 * 1024) ) ||
( cache_ptr->min_clean_size != (256 * 1024) ) ||
( cache_ptr->index_len != 2 ) ||
- ( cache_ptr->index_size !=
+ ( cache_ptr->index_size !=
MONSTER_ENTRY_SIZE + MEDIUM_ENTRY_SIZE ) ) {
pass = FALSE;
@@ -10509,7 +10509,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -10520,7 +10520,7 @@ check_auto_cache_resize(void)
( cache_ptr->max_cache_size != (512 * 1024) ) ||
( cache_ptr->min_clean_size != (256 * 1024) ) ||
( cache_ptr->index_len != 2 ) ||
- ( cache_ptr->index_size !=
+ ( cache_ptr->index_size !=
MONSTER_ENTRY_SIZE + MEDIUM_ENTRY_SIZE ) ) {
pass = FALSE;
@@ -10601,7 +10601,7 @@ check_auto_cache_resize(void)
* for three epochs while the markers are inserted into the cache
*
* Note that hit rate will be zero, so the cache will attempt to
- * increase its size. Since we are already at max size, it will
+ * increase its size. Since we are already at max size, it will
* not be able to.
*/
if ( pass ) { /* first epoch */
@@ -10613,7 +10613,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -10640,7 +10640,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -10667,7 +10667,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -10686,10 +10686,10 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* fourth epoch -- If the hit rate were above the lower threshold,
- * we would see cache size reduction now. However, nothing will
+ * we would see cache size reduction now. However, nothing will
* happen until we get the hit rate above the lower threshold.
*/
- if ( pass ) {
+ if ( pass ) {
rpt_fcn_called = FALSE;
i = 3000;
@@ -10698,7 +10698,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -10716,10 +10716,10 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* fifth epoch -- force the hit rate to 100%. We should see cache size
- * reduction now.
+ /* fifth epoch -- force the hit rate to 100%. We should see cache size
+ * reduction now.
*/
- if ( pass ) {
+ if ( pass ) {
rpt_fcn_called = FALSE;
i = 3000;
@@ -10728,7 +10728,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -10746,9 +10746,9 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* sixth epoch -- force the hit rate to 100% again.
+ /* sixth epoch -- force the hit rate to 100% again.
*/
- if ( pass ) {
+ if ( pass ) {
rpt_fcn_called = FALSE;
i = 3000;
@@ -10757,7 +10757,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -10775,9 +10775,9 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* seventh epoch -- force the hit rate to 100% again.
+ /* seventh epoch -- force the hit rate to 100% again.
*/
- if ( pass ) {
+ if ( pass ) {
rpt_fcn_called = FALSE;
i = 3000;
@@ -10786,7 +10786,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -10804,10 +10804,10 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* eigth epoch -- force the hit rate to 100% again -- should be steady
- * state.
+ /* eigth epoch -- force the hit rate to 100% again -- should be steady
+ * state.
*/
- if ( pass ) {
+ if ( pass ) {
rpt_fcn_called = FALSE;
i = 3000;
@@ -10816,7 +10816,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -10834,7 +10834,7 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* now just bang on one entry -- after three epochs, this should
+ /* now just bang on one entry -- after three epochs, this should
* get all entries other than the one evicted, and the cache size
* should be decreased to the minimum.
*/
@@ -10847,7 +10847,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -10874,7 +10874,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -10901,7 +10901,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -10912,7 +10912,7 @@ check_auto_cache_resize(void)
( cache_ptr->max_cache_size != (512 * 1024) ) ||
( cache_ptr->min_clean_size != (256 * 1024) ) ||
( cache_ptr->index_len != 2 ) ||
- ( cache_ptr->index_size !=
+ ( cache_ptr->index_size !=
MONSTER_ENTRY_SIZE + MEDIUM_ENTRY_SIZE ) ) {
pass = FALSE;
@@ -10931,7 +10931,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -10942,7 +10942,7 @@ check_auto_cache_resize(void)
( cache_ptr->max_cache_size != (512 * 1024) ) ||
( cache_ptr->min_clean_size != (256 * 1024) ) ||
( cache_ptr->index_len != 2 ) ||
- ( cache_ptr->index_size !=
+ ( cache_ptr->index_size !=
MONSTER_ENTRY_SIZE + MEDIUM_ENTRY_SIZE ) ) {
pass = FALSE;
@@ -11022,7 +11022,7 @@ check_auto_cache_resize(void)
/* fill the cache with 4K byte entries -- increment mode is off,
- * so cache size reduction should kick in as soon as we get the
+ * so cache size reduction should kick in as soon as we get the
* hit rate above .999.
*/
if ( pass ) { /* first epoch -- hit rate 0 */
@@ -11034,7 +11034,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -11061,7 +11061,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -11088,7 +11088,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -11107,7 +11107,7 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* fourth epoch -- load up the cache again -- hit rate 0 */
- if ( pass ) {
+ if ( pass ) {
rpt_fcn_called = FALSE;
i = 0;
@@ -11116,7 +11116,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -11135,7 +11135,7 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* fifth epoch -- still loading up the cache -- hit rate 0 */
- if ( pass ) {
+ if ( pass ) {
rpt_fcn_called = FALSE;
i = 1000;
@@ -11144,7 +11144,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -11163,7 +11163,7 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* sixth epoch -- force hit rate to .998 -- should be no reduction */
- if ( pass ) {
+ if ( pass ) {
rpt_fcn_called = FALSE;
i = 1002;
@@ -11172,7 +11172,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -11190,9 +11190,9 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* seventh epoch -- force hit rate to .999 -- should see reduction
+ /* seventh epoch -- force hit rate to .999 -- should see reduction
*/
- if ( pass ) {
+ if ( pass ) {
rpt_fcn_called = FALSE;
i = 1003;
@@ -11201,7 +11201,7 @@ check_auto_cache_resize(void)
protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -11352,7 +11352,7 @@ check_auto_cache_resize(void)
*
* In this epoch, all we should see is a reduction in the index size.
*/
- if ( pass ) {
+ if ( pass ) {
rpt_fcn_called = FALSE;
i = 0;
@@ -11383,7 +11383,7 @@ check_auto_cache_resize(void)
/* fourth epoch -- hit rate still 1.0. Index size should decrease,
* but otherwise no change expected.
*/
- if ( pass ) {
+ if ( pass ) {
rpt_fcn_called = FALSE;
i = 0;
@@ -11414,7 +11414,7 @@ check_auto_cache_resize(void)
/* fifth epoch -- hit rate still 1.0. Index size should decrease,
* but otherwise no change expected.
*/
- if ( pass ) {
+ if ( pass ) {
rpt_fcn_called = FALSE;
i = 0;
@@ -11446,7 +11446,7 @@ check_auto_cache_resize(void)
* but otherwise no change expected. Note that the cache size is
* now just on the edge of meeting the clean reserve.
*/
- if ( pass ) {
+ if ( pass ) {
rpt_fcn_called = FALSE;
i = 0;
@@ -11476,7 +11476,7 @@ check_auto_cache_resize(void)
/* seventh epoch -- hit rate still 1.0. No change in index size expected.
*/
- if ( pass ) {
+ if ( pass ) {
rpt_fcn_called = FALSE;
i = 0;
@@ -11504,10 +11504,10 @@ check_auto_cache_resize(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* eighth epoch -- start loading 1 KB entries. Hit rate 0 so
+ /* eighth epoch -- start loading 1 KB entries. Hit rate 0 so
* decrease code shouldn't be called.
*/
- if ( pass ) {
+ if ( pass ) {
rpt_fcn_called = FALSE;
i = 0;
@@ -11539,7 +11539,7 @@ check_auto_cache_resize(void)
* to 1.0. Decrease code should be triggered, but the max decrease
* should prevent the empty reserve from being met in this epoch.
*/
- if ( pass ) {
+ if ( pass ) {
rpt_fcn_called = FALSE;
i = 0;
@@ -11571,7 +11571,7 @@ check_auto_cache_resize(void)
* to 1.0. Decrease code should be triggered, and the empty reserve
* should finally be met.
*/
- if ( pass ) {
+ if ( pass ) {
rpt_fcn_called = FALSE;
i = 0;
@@ -11603,7 +11603,7 @@ check_auto_cache_resize(void)
* to 1.0. Decrease code should be triggered, and the empty reserve
* should be met again.
*/
- if ( pass ) {
+ if ( pass ) {
rpt_fcn_called = FALSE;
i = 0;
@@ -11633,7 +11633,7 @@ check_auto_cache_resize(void)
/* twelth epoch -- hit rate 1.0 -- decrease as before.
*/
- if ( pass ) {
+ if ( pass ) {
rpt_fcn_called = FALSE;
i = 0;
@@ -11663,7 +11663,7 @@ check_auto_cache_resize(void)
/* thirteenth epoch -- hit rate 1.0 -- decrease as before.
*/
- if ( pass ) {
+ if ( pass ) {
rpt_fcn_called = FALSE;
i = 0;
@@ -11693,7 +11693,7 @@ check_auto_cache_resize(void)
/* fourteenth epoch -- hit rate 1.0 -- decrease as before.
*/
- if ( pass ) {
+ if ( pass ) {
rpt_fcn_called = FALSE;
i = 0;
@@ -11723,7 +11723,7 @@ check_auto_cache_resize(void)
/* fifteenth epoch -- hit rate 1.0 -- decrease as before.
*/
- if ( pass ) {
+ if ( pass ) {
rpt_fcn_called = FALSE;
i = 0;
@@ -11753,7 +11753,7 @@ check_auto_cache_resize(void)
/* sixteenth epoch -- hit rate 1.0 -- should be stable now
*/
- if ( pass ) {
+ if ( pass ) {
rpt_fcn_called = FALSE;
i = 0;
@@ -11791,7 +11791,7 @@ check_auto_cache_resize(void)
if ( pass ) { PASSED(); } else { H5_FAILED(); }
if ( ! pass )
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
+ HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
fcn_name, failure_mssg);
} /* check_auto_cache_resize() */
@@ -11869,7 +11869,7 @@ check_auto_cache_resize_disable(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* allocate a cache, enable automatic cache resizing, and then force
+ /* allocate a cache, enable automatic cache resizing, and then force
* the cache through all its operational modes. Verify that all
* performs as expected.
*/
@@ -11907,7 +11907,7 @@ check_auto_cache_resize_disable(void)
/******************************************************************
- * So far, we have forced the auto cache resize through all modes
+ * So far, we have forced the auto cache resize through all modes
* other than increase_disabled and decrease_disabled. Force these
* modes now. Note that there are several ways we can reach these
* modes.
@@ -11974,7 +11974,7 @@ check_auto_cache_resize_disable(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* force low hit rate with cache full -- increase disabled so should
+ /* force low hit rate with cache full -- increase disabled so should
* be no change in cache size, and result should be increase_disabled.
*/
if ( pass ) {
@@ -11986,7 +11986,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -12017,7 +12017,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -12035,7 +12035,7 @@ check_auto_cache_resize_disable(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* force low hit rate again -- increase disabled so should
+ /* force low hit rate again -- increase disabled so should
* be no change in cache size, and result should be increase_disabled.
*/
if ( pass ) {
@@ -12047,7 +12047,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -12090,7 +12090,7 @@ check_auto_cache_resize_disable(void)
auto_size_ctl.lower_hr_threshold = 0.0; /* disable size increases */
- auto_size_ctl.increment = 2.0;
+ auto_size_ctl.increment = 2.0;
auto_size_ctl.apply_max_increment = FALSE;
auto_size_ctl.max_increment = (4 * 1024 * 1024);
@@ -12131,7 +12131,7 @@ check_auto_cache_resize_disable(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* force low hit rate with cache full -- increase disabled so should
+ /* force low hit rate with cache full -- increase disabled so should
* be no change in cache size, and result should be in_spec.
*/
if ( pass ) {
@@ -12143,7 +12143,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -12174,7 +12174,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -12192,7 +12192,7 @@ check_auto_cache_resize_disable(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* force low hit rate again -- increase disabled so should
+ /* force low hit rate again -- increase disabled so should
* be no change in cache size, and result should be increase_disabled.
*/
if ( pass ) {
@@ -12204,7 +12204,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -12223,7 +12223,7 @@ check_auto_cache_resize_disable(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* Repeat the above tests yet again, disabling increase through the
+ /* Repeat the above tests yet again, disabling increase through the
* incr_mode.
*/
@@ -12245,9 +12245,9 @@ check_auto_cache_resize_disable(void)
auto_size_ctl.incr_mode = H5C_incr__off;
- auto_size_ctl.lower_hr_threshold = 0.75;
+ auto_size_ctl.lower_hr_threshold = 0.75;
- auto_size_ctl.increment = 2.0;
+ auto_size_ctl.increment = 2.0;
auto_size_ctl.apply_max_increment = FALSE;
auto_size_ctl.max_increment = (4 * 1024 * 1024);
@@ -12288,7 +12288,7 @@ check_auto_cache_resize_disable(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* force low hit rate with cache full -- increase disabled so should
+ /* force low hit rate with cache full -- increase disabled so should
* be no change in cache size, and result should be in_spec.
*/
if ( pass ) {
@@ -12300,7 +12300,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -12331,7 +12331,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -12349,7 +12349,7 @@ check_auto_cache_resize_disable(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* force low hit rate again -- increase disabled so should
+ /* force low hit rate again -- increase disabled so should
* be no change in cache size, and result should be increase_disabled.
*/
if ( pass ) {
@@ -12361,7 +12361,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -12401,9 +12401,9 @@ check_auto_cache_resize_disable(void)
auto_size_ctl.incr_mode = H5C_incr__threshold;
- auto_size_ctl.lower_hr_threshold = 0.75;
+ auto_size_ctl.lower_hr_threshold = 0.75;
- auto_size_ctl.increment = 2.0;
+ auto_size_ctl.increment = 2.0;
auto_size_ctl.apply_max_increment = TRUE;
auto_size_ctl.max_increment = (2 * 1024 * 1024);
@@ -12458,7 +12458,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -12487,7 +12487,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -12517,7 +12517,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -12557,9 +12557,9 @@ check_auto_cache_resize_disable(void)
auto_size_ctl.incr_mode = H5C_incr__threshold;
- auto_size_ctl.lower_hr_threshold = 0.75;
+ auto_size_ctl.lower_hr_threshold = 0.75;
- auto_size_ctl.increment = 2.0;
+ auto_size_ctl.increment = 2.0;
auto_size_ctl.apply_max_increment = TRUE;
auto_size_ctl.max_increment = (2 * 1024 * 1024);
@@ -12569,7 +12569,7 @@ check_auto_cache_resize_disable(void)
auto_size_ctl.upper_hr_threshold = 1.0; /* disable size decreases */
- auto_size_ctl.decrement = 0.5;
+ auto_size_ctl.decrement = 0.5;
auto_size_ctl.apply_max_decrement = TRUE;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
@@ -12612,7 +12612,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -12642,7 +12642,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -12672,7 +12672,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -12712,9 +12712,9 @@ check_auto_cache_resize_disable(void)
auto_size_ctl.incr_mode = H5C_incr__threshold;
- auto_size_ctl.lower_hr_threshold = 0.75;
+ auto_size_ctl.lower_hr_threshold = 0.75;
- auto_size_ctl.increment = 2.0;
+ auto_size_ctl.increment = 2.0;
auto_size_ctl.apply_max_increment = TRUE;
auto_size_ctl.max_increment = (2 * 1024 * 1024);
@@ -12724,7 +12724,7 @@ check_auto_cache_resize_disable(void)
auto_size_ctl.upper_hr_threshold = 0.995;
- auto_size_ctl.decrement = 0.5;
+ auto_size_ctl.decrement = 0.5;
auto_size_ctl.apply_max_decrement = TRUE;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
@@ -12767,7 +12767,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -12797,7 +12797,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -12827,7 +12827,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -12869,9 +12869,9 @@ check_auto_cache_resize_disable(void)
auto_size_ctl.incr_mode = H5C_incr__threshold;
- auto_size_ctl.lower_hr_threshold = 0.75;
+ auto_size_ctl.lower_hr_threshold = 0.75;
- auto_size_ctl.increment = 2.0;
+ auto_size_ctl.increment = 2.0;
auto_size_ctl.apply_max_increment = TRUE;
auto_size_ctl.max_increment = (2 * 1024 * 1024);
@@ -12881,7 +12881,7 @@ check_auto_cache_resize_disable(void)
auto_size_ctl.upper_hr_threshold = 0.995;
- auto_size_ctl.decrement = 0.5;
+ auto_size_ctl.decrement = 0.5;
auto_size_ctl.apply_max_decrement = TRUE;
auto_size_ctl.max_decrement = 0; /* disable decrement */
@@ -12929,7 +12929,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, SMALL_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -12959,7 +12959,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, SMALL_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -12978,7 +12978,7 @@ check_auto_cache_resize_disable(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* Now force a high hit rate so that the size increase code is
+ /* Now force a high hit rate so that the size increase code is
* is satisfied. We would see a decrease here if decrease were
* possible.
*/
@@ -12991,7 +12991,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, SMALL_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -13021,7 +13021,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -13041,7 +13041,7 @@ check_auto_cache_resize_disable(void)
/* just bang on a single entry. This will see to it that there are
* many entries that could be aged out were decreases enabled.
- * Should be no change in cache size, and result should be
+ * Should be no change in cache size, and result should be
* decrease_disabled.
*/
if ( pass ) {
@@ -13053,7 +13053,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -13093,9 +13093,9 @@ check_auto_cache_resize_disable(void)
auto_size_ctl.incr_mode = H5C_incr__threshold;
- auto_size_ctl.lower_hr_threshold = 0.75;
+ auto_size_ctl.lower_hr_threshold = 0.75;
- auto_size_ctl.increment = 2.0;
+ auto_size_ctl.increment = 2.0;
auto_size_ctl.apply_max_increment = TRUE;
auto_size_ctl.max_increment = (2 * 1024 * 1024);
@@ -13105,7 +13105,7 @@ check_auto_cache_resize_disable(void)
auto_size_ctl.upper_hr_threshold = 0.995;
- auto_size_ctl.decrement = 0.5;
+ auto_size_ctl.decrement = 0.5;
auto_size_ctl.apply_max_decrement = TRUE;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
@@ -13153,7 +13153,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, SMALL_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -13183,7 +13183,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, SMALL_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -13202,7 +13202,7 @@ check_auto_cache_resize_disable(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* Now force a high hit rate so that the size increase code is
+ /* Now force a high hit rate so that the size increase code is
* is satisfied. We would see a decrease here if decrease were
* possible.
*/
@@ -13215,7 +13215,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, SMALL_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -13245,7 +13245,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -13265,7 +13265,7 @@ check_auto_cache_resize_disable(void)
/* just bang on a single entry. This will see to it that there are
* many entries that could be aged out were decreases enabled.
- * Should be no change in cache size, and result should be
+ * Should be no change in cache size, and result should be
* decrease_disabled.
*/
if ( pass ) {
@@ -13277,7 +13277,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -13296,13 +13296,13 @@ check_auto_cache_resize_disable(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* Now work with age out with threshold. One can argue that we should
+ /* Now work with age out with threshold. One can argue that we should
* repeat the above age out tests with age out with threshold, but the
- * same code is executed in both cases so I don't see the point. If
+ * same code is executed in both cases so I don't see the point. If
* that ever changes, this test should be updated.
*
* There is only one way of disabling decrements that is peculiar
- * to age out with threshold, which is to set the upper threshold
+ * to age out with threshold, which is to set the upper threshold
* to 1.0. Test this now.
*/
@@ -13324,9 +13324,9 @@ check_auto_cache_resize_disable(void)
auto_size_ctl.incr_mode = H5C_incr__threshold;
- auto_size_ctl.lower_hr_threshold = 0.75;
+ auto_size_ctl.lower_hr_threshold = 0.75;
- auto_size_ctl.increment = 2.0;
+ auto_size_ctl.increment = 2.0;
auto_size_ctl.apply_max_increment = TRUE;
auto_size_ctl.max_increment = (2 * 1024 * 1024);
@@ -13336,7 +13336,7 @@ check_auto_cache_resize_disable(void)
auto_size_ctl.upper_hr_threshold = 1.0;
- auto_size_ctl.decrement = 0.5;
+ auto_size_ctl.decrement = 0.5;
auto_size_ctl.apply_max_decrement = TRUE;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
@@ -13384,7 +13384,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, SMALL_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -13414,7 +13414,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, SMALL_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -13433,7 +13433,7 @@ check_auto_cache_resize_disable(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* Now force a high hit rate so that the size increase code is
+ /* Now force a high hit rate so that the size increase code is
* is satisfied. We would see a decrease here if decrease were
* possible, but the upper threshold cannot be met, so no decrease.
*
@@ -13448,7 +13448,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, SMALL_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -13480,7 +13480,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -13499,10 +13499,10 @@ check_auto_cache_resize_disable(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* just bang on a single entry. This keeps the hit rate high, and sees
- * to it that there are many entries that could be aged out were
+ * to it that there are many entries that could be aged out were
* decreases enabled.
*
- * Should be no change in cache size, and result should be
+ * Should be no change in cache size, and result should be
* decrease_disabled.
*/
if ( pass ) {
@@ -13514,7 +13514,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 999);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 999,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 999,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -13535,9 +13535,9 @@ check_auto_cache_resize_disable(void)
/*********************************************************************
- * Finally, use the auto cache resize code to set the size of the
- * cache and keep it there. Again, due to the complexity of the
- * interface, there are lots of ways of doing this. We have to
+ * Finally, use the auto cache resize code to set the size of the
+ * cache and keep it there. Again, due to the complexity of the
+ * interface, there are lots of ways of doing this. We have to
* check them all.
*********************************************************************/
@@ -13561,7 +13561,7 @@ check_auto_cache_resize_disable(void)
auto_size_ctl.lower_hr_threshold = 0.0; /* disable size increases */
- auto_size_ctl.increment = 2.0;
+ auto_size_ctl.increment = 2.0;
auto_size_ctl.apply_max_increment = TRUE;
auto_size_ctl.max_increment = (2 * 1024 * 1024);
@@ -13571,7 +13571,7 @@ check_auto_cache_resize_disable(void)
auto_size_ctl.upper_hr_threshold = 1.0; /* disable size decreases */
- auto_size_ctl.decrement = 0.5;
+ auto_size_ctl.decrement = 0.5;
auto_size_ctl.apply_max_decrement = TRUE;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
@@ -13602,7 +13602,7 @@ check_auto_cache_resize_disable(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* force low hit rate -- should be no response as the auto-resize
+ /* force low hit rate -- should be no response as the auto-resize
* code should be disabled.
*/
if ( pass ) {
@@ -13614,7 +13614,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -13646,7 +13646,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -13727,7 +13727,7 @@ check_auto_cache_resize_disable(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* force low hit rate -- should be no response as the auto-resize
+ /* force low hit rate -- should be no response as the auto-resize
* code should be disabled.
*/
if ( pass ) {
@@ -13739,7 +13739,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -13771,7 +13771,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -13852,7 +13852,7 @@ check_auto_cache_resize_disable(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* force low hit rate -- should be no response as the auto-resize
+ /* force low hit rate -- should be no response as the auto-resize
* code should be disabled.
*/
if ( pass ) {
@@ -13864,7 +13864,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -13896,7 +13896,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -13977,7 +13977,7 @@ check_auto_cache_resize_disable(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* force low hit rate -- should be no response as the auto-resize
+ /* force low hit rate -- should be no response as the auto-resize
* code should be disabled.
*/
if ( pass ) {
@@ -13989,7 +13989,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -14021,7 +14021,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -14103,7 +14103,7 @@ check_auto_cache_resize_disable(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* force low hit rate -- should be no response as the auto-resize
+ /* force low hit rate -- should be no response as the auto-resize
* code should be disabled.
*/
if ( pass ) {
@@ -14115,7 +14115,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -14147,7 +14147,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -14229,7 +14229,7 @@ check_auto_cache_resize_disable(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* force low hit rate -- should be no response as the auto-resize
+ /* force low hit rate -- should be no response as the auto-resize
* code should be disabled.
*/
if ( pass ) {
@@ -14241,7 +14241,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -14273,7 +14273,7 @@ check_auto_cache_resize_disable(void)
protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -14303,7 +14303,7 @@ check_auto_cache_resize_disable(void)
if ( pass ) { PASSED(); } else { H5_FAILED(); }
if ( ! pass )
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
+ HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
fcn_name, failure_mssg);
} /* check_auto_cache_resize_disable() */
@@ -14452,10 +14452,10 @@ check_auto_cache_resize_epoch_markers(void)
auto_size_ctl.apply_max_decrement = FALSE;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
- auto_size_ctl.epochs_before_eviction = 10;
+ auto_size_ctl.epochs_before_eviction = 10;
auto_size_ctl.apply_empty_reserve = FALSE;
- auto_size_ctl.empty_reserve = 0.05;
+ auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
@@ -14520,7 +14520,7 @@ check_auto_cache_resize_epoch_markers(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- if ( pass ) {
+ if ( pass ) {
j = 2;
while ( ( pass ) && ( j <= 10 ) )
@@ -14553,10 +14553,10 @@ check_auto_cache_resize_epoch_markers(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* we now have a full complement of epoch markers -- see if
+ /* we now have a full complement of epoch markers -- see if
* we get the expected reduction.
*/
- if ( pass ) {
+ if ( pass ) {
rpt_fcn_called = FALSE;
i = 9000;
@@ -14573,11 +14573,11 @@ check_auto_cache_resize_epoch_markers(void)
if ( ( ! rpt_fcn_called ) ||
( rpt_status != decrease ) ||
- ( cache_ptr->max_cache_size !=
+ ( cache_ptr->max_cache_size !=
(10 * 1000 * SMALL_ENTRY_SIZE + MEDIUM_ENTRY_SIZE) ) ||
- ( cache_ptr->min_clean_size !=
+ ( cache_ptr->min_clean_size !=
((10 * 1000 * SMALL_ENTRY_SIZE + MEDIUM_ENTRY_SIZE) / 2) ) ||
- ( cache_ptr->index_size !=
+ ( cache_ptr->index_size !=
(10 * 1000 * SMALL_ENTRY_SIZE + MEDIUM_ENTRY_SIZE) ) ) {
pass = FALSE;
@@ -14587,7 +14587,7 @@ check_auto_cache_resize_epoch_markers(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* now reduce the epochs before eviction, and see if the cache
+ /* now reduce the epochs before eviction, and see if the cache
* deletes the extra markers
*/
if ( pass ) {
@@ -14625,10 +14625,10 @@ check_auto_cache_resize_epoch_markers(void)
auto_size_ctl.apply_max_decrement = FALSE;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
- auto_size_ctl.epochs_before_eviction = 1;
+ auto_size_ctl.epochs_before_eviction = 1;
auto_size_ctl.apply_empty_reserve = FALSE;
- auto_size_ctl.empty_reserve = 0.05;
+ auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
@@ -14663,10 +14663,10 @@ check_auto_cache_resize_epoch_markers(void)
}
/* Now do an epochs worth of accesses, and verify that everything
- * not accessed in this epoch gets evicted, and the cache size
+ * not accessed in this epoch gets evicted, and the cache size
* is reduced.
*/
- if ( pass ) {
+ if ( pass ) {
rpt_fcn_called = FALSE;
i = 9000;
@@ -14743,10 +14743,10 @@ check_auto_cache_resize_epoch_markers(void)
auto_size_ctl.apply_max_decrement = FALSE;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
- auto_size_ctl.epochs_before_eviction = 1;
+ auto_size_ctl.epochs_before_eviction = 1;
auto_size_ctl.apply_empty_reserve = FALSE;
- auto_size_ctl.empty_reserve = 0.05;
+ auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
@@ -14780,7 +14780,7 @@ check_auto_cache_resize_epoch_markers(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
- /* shift the decrement mode to age out with threshold. Set epochs
+ /* shift the decrement mode to age out with threshold. Set epochs
* before eviction to 10 again.
*/
if ( pass ) {
@@ -14818,10 +14818,10 @@ check_auto_cache_resize_epoch_markers(void)
auto_size_ctl.apply_max_decrement = FALSE;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
- auto_size_ctl.epochs_before_eviction = 10;
+ auto_size_ctl.epochs_before_eviction = 10;
auto_size_ctl.apply_empty_reserve = FALSE;
- auto_size_ctl.empty_reserve = 0.05;
+ auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
@@ -14846,7 +14846,7 @@ check_auto_cache_resize_epoch_markers(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* build up a full set of epoch markers. */
- if ( pass ) {
+ if ( pass ) {
j = 1;
while ( ( pass ) && ( j <= 10 ) )
@@ -14928,10 +14928,10 @@ check_auto_cache_resize_epoch_markers(void)
auto_size_ctl.apply_max_decrement = FALSE;
auto_size_ctl.max_decrement = (1 * 1024 * 1024);
- auto_size_ctl.epochs_before_eviction = 10;
+ auto_size_ctl.epochs_before_eviction = 10;
auto_size_ctl.apply_empty_reserve = FALSE;
- auto_size_ctl.empty_reserve = 0.05;
+ auto_size_ctl.empty_reserve = 0.05;
result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
@@ -14958,7 +14958,7 @@ check_auto_cache_resize_epoch_markers(void)
/* verify that we still have the expected number of entries in the cache,
* and that the cache is of the expected size.
*/
- if ( pass ) {
+ if ( pass ) {
if ( ( cache_ptr->max_cache_size != (8 * 1024 * 1024) ) ||
( cache_ptr->min_clean_size != (4 * 1024 * 1024) )||
@@ -14982,7 +14982,7 @@ check_auto_cache_resize_epoch_markers(void)
if ( pass ) { PASSED(); } else { H5_FAILED(); }
if ( ! pass )
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
+ HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
fcn_name, failure_mssg);
} /* check_auto_cache_resize_epoch_markers() */
@@ -15083,7 +15083,7 @@ check_auto_cache_resize_input_errs(void)
pass = TRUE;
- /* allocate a cache, and set a reference automatic cache control
+ /* allocate a cache, and set a reference automatic cache control
* configuration. Then feed H5C_set_cache_auto_resize_config()
* invalid input, and verify that the correct error is returned,
* and that the configuration is not modified.
@@ -15099,7 +15099,7 @@ check_auto_cache_resize_input_errs(void)
if ( pass ) {
- result = H5C_set_cache_auto_resize_config(cache_ptr,
+ result = H5C_set_cache_auto_resize_config(cache_ptr,
&ref_auto_size_ctl);
if ( result != SUCCEED ) {
@@ -15121,7 +15121,7 @@ check_auto_cache_resize_input_errs(void)
if ( pass ) {
- result = H5C_get_cache_auto_resize_config(cache_ptr,
+ result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
if ( result != SUCCEED ) {
@@ -15177,20 +15177,20 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(NULL,
+ result = H5C_set_cache_auto_resize_config(NULL,
&invalid_auto_size_ctl);
if ( result != FAIL ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_set_cache_auto_resize_config accepted NULL cache_ptr.\n";
}
}
if ( pass ) {
- result = H5C_get_cache_auto_resize_config(cache_ptr,
+ result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
if ( result != SUCCEED ) {
@@ -15249,20 +15249,20 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
+ result = H5C_set_cache_auto_resize_config(cache_ptr,
&invalid_auto_size_ctl);
if ( result != FAIL ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_set_cache_auto_resize_config accepted bad version.\n";
}
}
if ( pass ) {
- result = H5C_get_cache_auto_resize_config(cache_ptr,
+ result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
if ( result != SUCCEED ) {
@@ -15294,7 +15294,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.max_size = 16 * 1024 * 1024;
invalid_auto_size_ctl.min_size = 1 * 1024 * 1024;
-
+
invalid_auto_size_ctl.epoch_length = 5000;
@@ -15322,20 +15322,20 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
+ result = H5C_set_cache_auto_resize_config(cache_ptr,
&invalid_auto_size_ctl);
if ( result != FAIL ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_set_cache_auto_resize_config accepted bad init size 1.\n";
}
}
if ( pass ) {
- result = H5C_get_cache_auto_resize_config(cache_ptr,
+ result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
if ( result != SUCCEED ) {
@@ -15364,7 +15364,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.max_size = 16 * 1024 * 1024;
invalid_auto_size_ctl.min_size = 1 * 1024 * 1024;
-
+
invalid_auto_size_ctl.epoch_length = 5000;
@@ -15392,20 +15392,20 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
+ result = H5C_set_cache_auto_resize_config(cache_ptr,
&invalid_auto_size_ctl);
if ( result != FAIL ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_set_cache_auto_resize_config accepted bad init size 2.\n";
}
}
if ( pass ) {
- result = H5C_get_cache_auto_resize_config(cache_ptr,
+ result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
if ( result != SUCCEED ) {
@@ -15436,7 +15436,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.max_size = 16 * 1024 * 1024;
invalid_auto_size_ctl.min_size = 1 * 1024 * 1024;
-
+
invalid_auto_size_ctl.epoch_length = 5000;
@@ -15464,20 +15464,20 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
+ result = H5C_set_cache_auto_resize_config(cache_ptr,
&invalid_auto_size_ctl);
if ( result != FAIL ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_set_cache_auto_resize_config accepted bad min clean frac 1.\n";
}
}
if ( pass ) {
- result = H5C_get_cache_auto_resize_config(cache_ptr,
+ result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
if ( result != SUCCEED ) {
@@ -15505,7 +15505,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.max_size = 16 * 1024 * 1024;
invalid_auto_size_ctl.min_size = 1 * 1024 * 1024;
-
+
invalid_auto_size_ctl.epoch_length = 5000;
@@ -15533,20 +15533,20 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
+ result = H5C_set_cache_auto_resize_config(cache_ptr,
&invalid_auto_size_ctl);
if ( result != FAIL ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_set_cache_auto_resize_config accepted bad min clean frac 2.\n";
}
}
if ( pass ) {
- result = H5C_get_cache_auto_resize_config(cache_ptr,
+ result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
if ( result != SUCCEED ) {
@@ -15606,20 +15606,20 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
+ result = H5C_set_cache_auto_resize_config(cache_ptr,
&invalid_auto_size_ctl);
if ( result != FAIL ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_set_cache_auto_resize_config accepted bad max_size.\n";
}
}
if ( pass ) {
- result = H5C_get_cache_auto_resize_config(cache_ptr,
+ result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
if ( result != SUCCEED ) {
@@ -15675,20 +15675,20 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
+ result = H5C_set_cache_auto_resize_config(cache_ptr,
&invalid_auto_size_ctl);
if ( result != FAIL ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_set_cache_auto_resize_config accepted bad size pair.\n";
}
}
if ( pass ) {
- result = H5C_get_cache_auto_resize_config(cache_ptr,
+ result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
if ( result != SUCCEED ) {
@@ -15744,20 +15744,20 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
+ result = H5C_set_cache_auto_resize_config(cache_ptr,
&invalid_auto_size_ctl);
if ( result != FAIL ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_set_cache_auto_resize_config accepted bad min_size.\n";
}
}
if ( pass ) {
- result = H5C_get_cache_auto_resize_config(cache_ptr,
+ result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
if ( result != SUCCEED ) {
@@ -15788,7 +15788,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.max_size = 16 * 1024 * 1024;
invalid_auto_size_ctl.min_size = 1 * 1024 * 1024;
-
+
invalid_auto_size_ctl.epoch_length = H5C__MAX_AR_EPOCH_LENGTH + 1;
/* INVALID */
@@ -15816,20 +15816,20 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
+ result = H5C_set_cache_auto_resize_config(cache_ptr,
&invalid_auto_size_ctl);
if ( result != FAIL ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_set_cache_auto_resize_config accepted bad epoch len 1.\n";
}
}
if ( pass ) {
- result = H5C_get_cache_auto_resize_config(cache_ptr,
+ result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
if ( result != SUCCEED ) {
@@ -15857,7 +15857,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.max_size = 16 * 1024 * 1024;
invalid_auto_size_ctl.min_size = 1 * 1024 * 1024;
-
+
invalid_auto_size_ctl.epoch_length = H5C__MIN_AR_EPOCH_LENGTH - 1;
/* INVALID */
@@ -15885,20 +15885,20 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
+ result = H5C_set_cache_auto_resize_config(cache_ptr,
&invalid_auto_size_ctl);
if ( result != FAIL ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_set_cache_auto_resize_config accepted bad epoch len 2.\n";
}
}
if ( pass ) {
- result = H5C_get_cache_auto_resize_config(cache_ptr,
+ result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
if ( result != SUCCEED ) {
@@ -15929,11 +15929,11 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.max_size = 16 * 1024 * 1024;
invalid_auto_size_ctl.min_size = 1 * 1024 * 1024;
-
+
invalid_auto_size_ctl.epoch_length = 5000;
-
- invalid_auto_size_ctl.incr_mode =
+
+ invalid_auto_size_ctl.incr_mode =
(enum H5C_cache_incr_mode) -1; /* INVALID */
invalid_auto_size_ctl.lower_hr_threshold = 0.75;
@@ -15958,20 +15958,20 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
+ result = H5C_set_cache_auto_resize_config(cache_ptr,
&invalid_auto_size_ctl);
if ( result != FAIL ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_set_cache_auto_resize_config accepted bad incr_mode 1.\n";
}
}
if ( pass ) {
- result = H5C_get_cache_auto_resize_config(cache_ptr,
+ result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
if ( result != SUCCEED ) {
@@ -15999,11 +15999,11 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.max_size = 16 * 1024 * 1024;
invalid_auto_size_ctl.min_size = 1 * 1024 * 1024;
-
+
invalid_auto_size_ctl.epoch_length = 5000;
-
- invalid_auto_size_ctl.incr_mode =
+
+ invalid_auto_size_ctl.incr_mode =
(enum H5C_cache_incr_mode) 2; /* INVALID */
invalid_auto_size_ctl.lower_hr_threshold = 0.75;
@@ -16028,20 +16028,20 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
+ result = H5C_set_cache_auto_resize_config(cache_ptr,
&invalid_auto_size_ctl);
if ( result != FAIL ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_set_cache_auto_resize_config accepted bad incr_mode 2.\n";
}
}
if ( pass ) {
- result = H5C_get_cache_auto_resize_config(cache_ptr,
+ result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
if ( result != SUCCEED ) {
@@ -16100,20 +16100,20 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
+ result = H5C_set_cache_auto_resize_config(cache_ptr,
&invalid_auto_size_ctl);
if ( result != FAIL ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_set_cache_auto_resize_config accepted bad upper threshold.\n";
}
}
if ( pass ) {
- result = H5C_get_cache_auto_resize_config(cache_ptr,
+ result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
if ( result != SUCCEED ) {
@@ -16169,20 +16169,20 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
+ result = H5C_set_cache_auto_resize_config(cache_ptr,
&invalid_auto_size_ctl);
if ( result != FAIL ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_set_cache_auto_resize_config accepted bad threshold pair.\n";
}
}
if ( pass ) {
- result = H5C_get_cache_auto_resize_config(cache_ptr,
+ result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
if ( result != SUCCEED ) {
@@ -16238,20 +16238,20 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
+ result = H5C_set_cache_auto_resize_config(cache_ptr,
&invalid_auto_size_ctl);
if ( result != FAIL ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_set_cache_auto_resize_config accepted bad lower threshold.\n";
}
}
if ( pass ) {
- result = H5C_get_cache_auto_resize_config(cache_ptr,
+ result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
if ( result != SUCCEED ) {
@@ -16282,7 +16282,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.max_size = 16 * 1024 * 1024;
invalid_auto_size_ctl.min_size = 1 * 1024 * 1024;
-
+
invalid_auto_size_ctl.epoch_length = 5000;
@@ -16311,20 +16311,20 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
+ result = H5C_set_cache_auto_resize_config(cache_ptr,
&invalid_auto_size_ctl);
if ( result != FAIL ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_set_cache_auto_resize_config accepted bad increment.\n";
}
}
if ( pass ) {
- result = H5C_get_cache_auto_resize_config(cache_ptr,
+ result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
if ( result != SUCCEED ) {
@@ -16355,9 +16355,9 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.max_size = 16 * 1024 * 1024;
invalid_auto_size_ctl.min_size = 1 * 1024 * 1024;
-
+
invalid_auto_size_ctl.epoch_length = 5000;
-
+
invalid_auto_size_ctl.incr_mode = H5C_incr__threshold;
@@ -16369,7 +16369,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
- invalid_auto_size_ctl.decr_mode =
+ invalid_auto_size_ctl.decr_mode =
(enum H5C_cache_decr_mode) -1; /* INVALID */
invalid_auto_size_ctl.upper_hr_threshold = 0.999;
@@ -16384,20 +16384,20 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
+ result = H5C_set_cache_auto_resize_config(cache_ptr,
&invalid_auto_size_ctl);
if ( result != FAIL ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_set_cache_auto_resize_config accepted bad decr_mode 1.\n";
}
}
if ( pass ) {
- result = H5C_get_cache_auto_resize_config(cache_ptr,
+ result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
if ( result != SUCCEED ) {
@@ -16425,9 +16425,9 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.max_size = 16 * 1024 * 1024;
invalid_auto_size_ctl.min_size = 1 * 1024 * 1024;
-
+
invalid_auto_size_ctl.epoch_length = 5000;
-
+
invalid_auto_size_ctl.incr_mode = H5C_incr__threshold;
@@ -16439,7 +16439,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.max_increment = (2 * 1024 * 1024);
- invalid_auto_size_ctl.decr_mode =
+ invalid_auto_size_ctl.decr_mode =
(enum H5C_cache_decr_mode) 4; /* INVALID */
invalid_auto_size_ctl.upper_hr_threshold = 0.999;
@@ -16454,20 +16454,20 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
+ result = H5C_set_cache_auto_resize_config(cache_ptr,
&invalid_auto_size_ctl);
if ( result != FAIL ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_set_cache_auto_resize_config accepted bad decr_mode 2.\n";
}
}
if ( pass ) {
- result = H5C_get_cache_auto_resize_config(cache_ptr,
+ result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
if ( result != SUCCEED ) {
@@ -16498,7 +16498,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.max_size = 16 * 1024 * 1024;
invalid_auto_size_ctl.min_size = 1 * 1024 * 1024;
-
+
invalid_auto_size_ctl.epoch_length = 5000;
@@ -16526,20 +16526,20 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
+ result = H5C_set_cache_auto_resize_config(cache_ptr,
&invalid_auto_size_ctl);
if ( result != FAIL ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_set_cache_auto_resize_config accepted bad decrement 1.\n";
}
}
if ( pass ) {
- result = H5C_get_cache_auto_resize_config(cache_ptr,
+ result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
if ( result != SUCCEED ) {
@@ -16567,7 +16567,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.max_size = 16 * 1024 * 1024;
invalid_auto_size_ctl.min_size = 1 * 1024 * 1024;
-
+
invalid_auto_size_ctl.epoch_length = 5000;
@@ -16595,20 +16595,20 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
+ result = H5C_set_cache_auto_resize_config(cache_ptr,
&invalid_auto_size_ctl);
if ( result != FAIL ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_set_cache_auto_resize_config accepted bad decrement 2.\n";
}
}
if ( pass ) {
- result = H5C_get_cache_auto_resize_config(cache_ptr,
+ result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
if ( result != SUCCEED ) {
@@ -16639,7 +16639,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.max_size = 16 * 1024 * 1024;
invalid_auto_size_ctl.min_size = 1 * 1024 * 1024;
-
+
invalid_auto_size_ctl.epoch_length = 5000;
@@ -16667,7 +16667,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
+ result = H5C_set_cache_auto_resize_config(cache_ptr,
&invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -16679,7 +16679,7 @@ check_auto_cache_resize_input_errs(void)
if ( pass ) {
- result = H5C_get_cache_auto_resize_config(cache_ptr,
+ result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
if ( result != SUCCEED ) {
@@ -16707,7 +16707,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.max_size = 16 * 1024 * 1024;
invalid_auto_size_ctl.min_size = 1 * 1024 * 1024;
-
+
invalid_auto_size_ctl.epoch_length = 5000;
@@ -16730,13 +16730,13 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_max_decrement = TRUE;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
- invalid_auto_size_ctl.epochs_before_eviction =
+ invalid_auto_size_ctl.epochs_before_eviction =
H5C__MAX_EPOCH_MARKERS + 1; /* INVALID */
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
+ result = H5C_set_cache_auto_resize_config(cache_ptr,
&invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -16748,7 +16748,7 @@ check_auto_cache_resize_input_errs(void)
if ( pass ) {
- result = H5C_get_cache_auto_resize_config(cache_ptr,
+ result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
if ( result != SUCCEED ) {
@@ -16779,7 +16779,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.max_size = 16 * 1024 * 1024;
invalid_auto_size_ctl.min_size = 1 * 1024 * 1024;
-
+
invalid_auto_size_ctl.epoch_length = 5000;
@@ -16807,7 +16807,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = -0.0000001; /* INVALID */
- result = H5C_set_cache_auto_resize_config(cache_ptr,
+ result = H5C_set_cache_auto_resize_config(cache_ptr,
&invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -16819,7 +16819,7 @@ check_auto_cache_resize_input_errs(void)
if ( pass ) {
- result = H5C_get_cache_auto_resize_config(cache_ptr,
+ result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
if ( result != SUCCEED ) {
@@ -16847,7 +16847,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.max_size = 16 * 1024 * 1024;
invalid_auto_size_ctl.min_size = 1 * 1024 * 1024;
-
+
invalid_auto_size_ctl.epoch_length = 5000;
@@ -16870,13 +16870,13 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_max_decrement = TRUE;
invalid_auto_size_ctl.max_decrement = (1 * 1024 * 1024);
- invalid_auto_size_ctl.epochs_before_eviction =
+ invalid_auto_size_ctl.epochs_before_eviction =
H5C__MAX_EPOCH_MARKERS + 1; /* INVALID */
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
+ result = H5C_set_cache_auto_resize_config(cache_ptr,
&invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -16888,7 +16888,7 @@ check_auto_cache_resize_input_errs(void)
if ( pass ) {
- result = H5C_get_cache_auto_resize_config(cache_ptr,
+ result = H5C_get_cache_auto_resize_config(cache_ptr,
&test_auto_size_ctl);
if ( result != SUCCEED ) {
@@ -16905,7 +16905,7 @@ check_auto_cache_resize_input_errs(void)
}
- /* finally, before we finish, try feeding
+ /* finally, before we finish, try feeding
* H5C_get_cache_auto_resize_config invalid data.
*/
@@ -16916,7 +16916,7 @@ check_auto_cache_resize_input_errs(void)
if ( result != FAIL ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_get_cache_auto_resize_config accepted NULL cache_ptr.\n";
}
}
@@ -16929,7 +16929,7 @@ check_auto_cache_resize_input_errs(void)
if ( result != FAIL ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_get_cache_auto_resize_config accepted bad cache_ptr.\n";
}
}
@@ -16941,7 +16941,7 @@ check_auto_cache_resize_input_errs(void)
if ( result != FAIL ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_get_cache_auto_resize_config accepted NULL config ptr.\n";
}
}
@@ -16954,7 +16954,7 @@ check_auto_cache_resize_input_errs(void)
if ( pass ) { PASSED(); } else { H5_FAILED(); }
if ( ! pass )
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
+ HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
fcn_name, failure_mssg);
} /* check_auto_cache_resize_input_errs() */
@@ -16963,7 +16963,7 @@ check_auto_cache_resize_input_errs(void)
/*-------------------------------------------------------------------------
* Function: check_auto_cache_resize_aux_fcns()
*
- * Purpose: Verify that the auxilary functions associated with
+ * Purpose: Verify that the auxilary functions associated with
* the automatic cache resize capability are operating
* correctly. These functions are:
*
@@ -17055,7 +17055,7 @@ check_auto_cache_resize_aux_fcns(void)
if ( pass ) {
- result = H5C_set_cache_auto_resize_config(cache_ptr,
+ result = H5C_set_cache_auto_resize_config(cache_ptr,
&auto_size_ctl);
if ( result != SUCCEED ) {
@@ -17101,7 +17101,7 @@ check_auto_cache_resize_aux_fcns(void)
} else if ( hit_rate != 0.0 ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_get_cache_hit_rate returned unexpected hit rate 1.\n";
}
}
@@ -17116,7 +17116,7 @@ check_auto_cache_resize_aux_fcns(void)
if ( pass ) {
- unprotect_entry(cache_ptr, PICO_ENTRY_TYPE, i,
+ unprotect_entry(cache_ptr, PICO_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -17135,7 +17135,7 @@ check_auto_cache_resize_aux_fcns(void)
} else if ( hit_rate != 0.0 ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_get_cache_hit_rate returned unexpected hit rate 2.\n";
} else if ( ( cache_ptr->cache_accesses != 1000 ) ||
@@ -17162,7 +17162,7 @@ check_auto_cache_resize_aux_fcns(void)
if ( pass ) {
- unprotect_entry(cache_ptr, PICO_ENTRY_TYPE, 0,
+ unprotect_entry(cache_ptr, PICO_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -17181,7 +17181,7 @@ check_auto_cache_resize_aux_fcns(void)
} else if ( hit_rate != 0.5 ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_get_cache_hit_rate returned unexpected hit rate 3.\n";
} else if ( ( cache_ptr->cache_accesses != 2000 ) ||
@@ -17205,14 +17205,14 @@ check_auto_cache_resize_aux_fcns(void)
if ( result != FAIL ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_reset_cache_hit_rate_stats accepted NULL cache_ptr.\n";
} else if ( ( cache_ptr->cache_accesses != 2000 ) ||
( cache_ptr->cache_hits != 1000 ) ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"Failed call to H5C_reset_cache_hit_rate_stats altered stats?\n";
}
}
@@ -17245,7 +17245,7 @@ check_auto_cache_resize_aux_fcns(void)
if ( pass ) {
- unprotect_entry(cache_ptr, PICO_ENTRY_TYPE, i + 500,
+ unprotect_entry(cache_ptr, PICO_ENTRY_TYPE, i + 500,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -17265,7 +17265,7 @@ check_auto_cache_resize_aux_fcns(void)
} else if ( hit_rate != 0.5 ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_get_cache_hit_rate returned unexpected hit rate 4.\n";
} else if ( ( cache_ptr->cache_accesses != 1000 ) ||
@@ -17282,15 +17282,15 @@ check_auto_cache_resize_aux_fcns(void)
}
}
- /***************************************************
- * So much for testing H5C_get_cache_hit_rate() and
- * H5C_reset_cache_hit_rate_stats(). Now on to
+ /***************************************************
+ * So much for testing H5C_get_cache_hit_rate() and
+ * H5C_reset_cache_hit_rate_stats(). Now on to
* H5C_get_cache_size().
***************************************************/
if ( pass ) {
- result = H5C_get_cache_size(NULL, &max_size, &min_clean_size,
+ result = H5C_get_cache_size(NULL, &max_size, &min_clean_size,
&cur_size, &cur_num_entries);
if ( result != FAIL ) {
@@ -17307,7 +17307,7 @@ check_auto_cache_resize_aux_fcns(void)
cur_size = 0;
cur_num_entries = 0;
- result = H5C_get_cache_size(cache_ptr, &max_size, &min_clean_size,
+ result = H5C_get_cache_size(cache_ptr, &max_size, &min_clean_size,
&cur_size, &cur_num_entries);
if ( result != SUCCEED ) {
@@ -17318,25 +17318,25 @@ check_auto_cache_resize_aux_fcns(void)
} else if ( max_size != (1 * 1024 * 1024) ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_get_cache_size reports unexpected max_size 1.\n";
} else if ( min_clean_size != (512 * 1024) ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_get_cache_size reports unexpected min_clean_size 1.\n";
} else if ( cur_size != (1500 * PICO_ENTRY_SIZE) ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_get_cache_size reports unexpected cur_size 1.\n";
} else if ( cur_num_entries != 1500 ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_get_cache_size reports unexpected cur_num_entries 1.\n";
}
}
@@ -17350,7 +17350,7 @@ check_auto_cache_resize_aux_fcns(void)
}
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0, NO_CHANGE,
+ unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0, NO_CHANGE,
H5C__NO_FLAGS_SET);
}
@@ -17361,7 +17361,7 @@ check_auto_cache_resize_aux_fcns(void)
cur_size = 0;
cur_num_entries = 0;
- result = H5C_get_cache_size(cache_ptr, &max_size, &min_clean_size,
+ result = H5C_get_cache_size(cache_ptr, &max_size, &min_clean_size,
&cur_size, &cur_num_entries);
if ( result != SUCCEED ) {
@@ -17372,26 +17372,26 @@ check_auto_cache_resize_aux_fcns(void)
} else if ( max_size != (1 * 1024 * 1024) ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_get_cache_size reports unexpected max_size 2.\n";
} else if ( min_clean_size != (512 * 1024) ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_get_cache_size reports unexpected min_clean_size 2.\n";
- } else if ( cur_size !=
+ } else if ( cur_size !=
((1500 * PICO_ENTRY_SIZE) + MONSTER_ENTRY_SIZE) ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_get_cache_size reports unexpected cur_size 2.\n";
} else if ( cur_num_entries != 1501 ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_get_cache_size reports unexpected cur_num_entries 2.\n";
}
}
@@ -17413,7 +17413,7 @@ check_auto_cache_resize_aux_fcns(void)
} else if ( max_size != (1 * 1024 * 1024) ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_get_cache_size reports unexpected max_size 3.\n";
} else if ( ( min_clean_size != 0 ) ||
@@ -17423,7 +17423,7 @@ check_auto_cache_resize_aux_fcns(void)
pass = FALSE;
failure_mssg = "Phantom returns from H5C_get_cache_size?\n";
- }
+ }
}
if ( pass ) {
@@ -17433,7 +17433,7 @@ check_auto_cache_resize_aux_fcns(void)
cur_size = 0;
cur_num_entries = 0;
- result = H5C_get_cache_size(cache_ptr, NULL, &min_clean_size,
+ result = H5C_get_cache_size(cache_ptr, NULL, &min_clean_size,
NULL, NULL);
if ( result != SUCCEED ) {
@@ -17444,7 +17444,7 @@ check_auto_cache_resize_aux_fcns(void)
} else if ( min_clean_size != (512 * 1024) ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_get_cache_size reports unexpected min_clean_size 4.\n";
} else if ( ( max_size != 0 ) ||
@@ -17454,7 +17454,7 @@ check_auto_cache_resize_aux_fcns(void)
pass = FALSE;
failure_mssg = "Phantom returns from H5C_get_cache_size?\n";
- }
+ }
}
if ( pass ) {
@@ -17471,11 +17471,11 @@ check_auto_cache_resize_aux_fcns(void)
pass = FALSE;
failure_mssg = "H5C_get_cache_size failed 5.\n";
- } else if ( cur_size !=
+ } else if ( cur_size !=
((1500 * PICO_ENTRY_SIZE) + MONSTER_ENTRY_SIZE) ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_get_cache_size reports unexpected cur_size 5.\n";
} else if ( ( max_size != 0 ) ||
@@ -17485,7 +17485,7 @@ check_auto_cache_resize_aux_fcns(void)
pass = FALSE;
failure_mssg = "Phantom returns from H5C_get_cache_size?\n";
- }
+ }
}
if ( pass ) {
@@ -17495,7 +17495,7 @@ check_auto_cache_resize_aux_fcns(void)
cur_size = 0;
cur_num_entries = 0;
- result = H5C_get_cache_size(cache_ptr, NULL, NULL, NULL,
+ result = H5C_get_cache_size(cache_ptr, NULL, NULL, NULL,
&cur_num_entries);
if ( result != SUCCEED ) {
@@ -17506,7 +17506,7 @@ check_auto_cache_resize_aux_fcns(void)
} else if ( cur_num_entries != 1501 ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5C_get_cache_size reports unexpected cur_num_entries 2.\n";
} else if ( ( max_size != 0 ) ||
@@ -17516,7 +17516,7 @@ check_auto_cache_resize_aux_fcns(void)
pass = FALSE;
failure_mssg = "Phantom returns from H5C_get_cache_size?\n";
- }
+ }
}
if ( pass ) {
@@ -17527,7 +17527,7 @@ check_auto_cache_resize_aux_fcns(void)
if ( pass ) { PASSED(); } else { H5_FAILED(); }
if ( ! pass )
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
+ HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
fcn_name, failure_mssg);
} /* check_auto_cache_resize_aux_fcns() */
@@ -17536,8 +17536,8 @@ check_auto_cache_resize_aux_fcns(void)
/*-------------------------------------------------------------------------
* Function: check_fapl_mdc_api_calls()
*
- * Purpose: Verify that the file access property list related
- * metadata cache related API calls are functioning
+ * Purpose: Verify that the file access property list related
+ * metadata cache related API calls are functioning
* correctly.
*
* Since we have tested the H5C code elsewhere, it should
@@ -17621,7 +17621,7 @@ check_fapl_mdc_api_calls(void)
H5AC_cache_config_t default_config = H5AC__DEFAULT_CACHE_CONFIG;
H5AC_cache_config_t mod_config =
{
- /* int version = */
+ /* int version = */
H5AC__CURR_CACHE_CONFIG_VERSION,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t set_initial_size = */ TRUE,
@@ -17689,7 +17689,7 @@ check_fapl_mdc_api_calls(void)
}
- /* Modify the initial mdc configuration in a FAPL, and verify that
+ /* Modify the initial mdc configuration in a FAPL, and verify that
* the changes can be read back
*/
@@ -17732,16 +17732,16 @@ check_fapl_mdc_api_calls(void)
}
/* Open a file using the default FAPL. Verify that the resulting
- * metadata cache uses the default configuration as well. Get a
+ * metadata cache uses the default configuration as well. Get a
* copy of the FAPL from the file, and verify that it contains the
- * default initial meta data cache configuration. Close and delete
+ * default initial meta data cache configuration. Close and delete
* the file.
*/
/* setup the file name */
if ( pass ) {
- if ( h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename))
+ if ( h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename))
== NULL ) {
pass = FALSE;
@@ -17856,9 +17856,9 @@ check_fapl_mdc_api_calls(void)
/* Open a file using a FAPL with a modified initial metadata cache
- * configuration. Verify that the resulting metadata cache uses the
- * modified configuration as well. Get a copy of the FAPL from the
- * file, and verify that it contains the modified initial meta data
+ * configuration. Verify that the resulting metadata cache uses the
+ * modified configuration as well. Get a copy of the FAPL from the
+ * file, and verify that it contains the modified initial meta data
* cache configuration. Close and delete the file.
*/
@@ -17890,7 +17890,7 @@ check_fapl_mdc_api_calls(void)
/* setup the file name */
if ( pass ) {
- if ( h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename))
+ if ( h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename))
== NULL ) {
pass = FALSE;
@@ -18016,7 +18016,7 @@ check_fapl_mdc_api_calls(void)
if ( pass ) { PASSED(); } else { H5_FAILED(); }
if ( ! pass )
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
+ HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
fcn_name, failure_mssg);
} /* check_fapl_mdc_api_calls() */
@@ -18029,8 +18029,8 @@ check_fapl_mdc_api_calls(void)
* has both internal and external configuration matching
* *config_ptr.
*
- * Do nothin on success. On failure, set pass to FALSE, and
- * load an error message into failue_mssg. Note that
+ * Do nothin on success. On failure, set pass to FALSE, and
+ * load an error message into failue_mssg. Note that
* failure_msg is assumed to be at least 128 bytes in length.
*
* Return: void
@@ -18083,7 +18083,7 @@ validate_mdc_config(hid_t file_id,
( cache_ptr->resize_ctl.version != H5C__CURR_AUTO_SIZE_CTL_VER ) ){
pass = FALSE;
- HDsnprintf(msg, (size_t)128,
+ HDsnprintf(msg, (size_t)128,
"Can't access cache resize_ctl #%d.", test_num);
failure_mssg = msg;
}
@@ -18092,11 +18092,11 @@ validate_mdc_config(hid_t file_id,
/* compare the cache's internal configuration with the expected value */
if ( pass ) {
- if ( ! RESIZE_CONFIGS_ARE_EQUAL(int_config, cache_ptr->resize_ctl,
+ if ( ! RESIZE_CONFIGS_ARE_EQUAL(int_config, cache_ptr->resize_ctl,
compare_init) ) {
pass = FALSE;
- HDsnprintf(msg, (size_t)128,
+ HDsnprintf(msg, (size_t)128,
"Unexpected internal config #%d.", test_num);
failure_mssg = msg;
}
@@ -18110,7 +18110,7 @@ validate_mdc_config(hid_t file_id,
if ( H5Fget_mdc_config(file_id, &scratch) < 0 ) {
pass = FALSE;
- HDsnprintf(msg, (size_t)128,
+ HDsnprintf(msg, (size_t)128,
"H5Fget_mdc_config() failed #%d.", test_num);
failure_mssg = msg;
}
@@ -18125,7 +18125,7 @@ validate_mdc_config(hid_t file_id,
* the supplied external configuration.
*
* The cache also sets the initial_size field to the current
- * cache max size instead of the value initialy supplied.
+ * cache max size instead of the value initialy supplied.
* Depending on circumstances, this may or may not match
* the original. Hence the compare_init parameter.
*/
@@ -18133,7 +18133,7 @@ validate_mdc_config(hid_t file_id,
FALSE, compare_init) ) {
pass = FALSE;
- HDsnprintf(msg, (size_t)128,
+ HDsnprintf(msg, (size_t)128,
"Unexpected external config #%d.", test_num);
failure_mssg = msg;
}
@@ -18147,7 +18147,7 @@ validate_mdc_config(hid_t file_id,
/*-------------------------------------------------------------------------
* Function: check_file_mdc_api_calls()
*
- * Purpose: Verify that the file related metadata cache API calls are
+ * Purpose: Verify that the file related metadata cache API calls are
* functioning correctly.
*
* Since we have tested the H5C code elsewhere, it should
@@ -18267,7 +18267,7 @@ check_file_mdc_api_calls(void)
/* double increment = */ 2.0,
/* hbool_t apply_max_increment = */ TRUE,
/* size_t max_increment = */ (2 * 1024 * 1024),
- /* enum H5C_cache_decr_mode decr_mode = */
+ /* enum H5C_cache_decr_mode decr_mode = */
H5C_decr__age_out_with_threshold,
/* double upper_hr_threshold = */ 0.999,
/* double decrement = */ 0.9,
@@ -18293,7 +18293,7 @@ check_file_mdc_api_calls(void)
/* setup the file name */
if ( pass ) {
- if ( h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename))
+ if ( h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename))
== NULL ) {
pass = FALSE;
@@ -18369,8 +18369,8 @@ check_file_mdc_api_calls(void)
validate_mdc_config(file_id, &mod_config_4, TRUE, 5);
- /* Run some quick smoke checks on the cache status monitoring
- * calls -- no interesting data as the cache hasn't had a
+ /* Run some quick smoke checks on the cache status monitoring
+ * calls -- no interesting data as the cache hasn't had a
* chance to do much yet.
*/
@@ -18384,14 +18384,14 @@ check_file_mdc_api_calls(void)
} else if ( hit_rate != 0.0 ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5Fget_mdc_hit_rate() returned unexpected hit rate.\n";
- }
+ }
#if 0 /* this may be useful now and then -- keep it around */
else {
- HDfprintf(stdout,
+ HDfprintf(stdout,
"H5Fget_mdc_hit_rate() reports hit_rate = %lf:\n",
hit_rate);
}
@@ -18400,7 +18400,7 @@ check_file_mdc_api_calls(void)
if ( pass ) {
- if ( H5Fget_mdc_size(file_id, &max_size, &min_clean_size,
+ if ( H5Fget_mdc_size(file_id, &max_size, &min_clean_size,
&cur_size, &cur_num_entries) < 0 ) {
pass = FALSE;
@@ -18413,7 +18413,7 @@ check_file_mdc_api_calls(void)
pass = FALSE;
failure_mssg = "H5Fget_mdc_size() returned unexpected value(s).\n";
- }
+ }
#if 0 /* this may be useful now and then -- keep it around */
else {
@@ -18444,7 +18444,7 @@ check_file_mdc_api_calls(void)
if ( pass ) { PASSED(); } else { H5_FAILED(); }
if ( ! pass )
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
+ HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
fcn_name, failure_mssg);
} /* check_file_mdc_api_calls() */
@@ -18454,18 +18454,18 @@ check_file_mdc_api_calls(void)
* Function: check_and_validate_cache_hit_rate()
*
* Purpose: Use the API functions to get and reset the cache hit rate.
- * Verify that the value returned by the API call agrees with
+ * Verify that the value returned by the API call agrees with
* the cache internal data structures.
*
* If the number of cache accesses exceeds the value provided
* in the min_accesses parameter, and the hit rate is less than
- * min_hit_rate, set pass to FALSE, and set failure_mssg to
+ * min_hit_rate, set pass to FALSE, and set failure_mssg to
* a string indicating that hit rate was unexpectedly low.
*
* Return hit rate in *hit_rate_ptr, and print the data to
* stdout if requested.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to FALSE, and set
* failure_mssg to an appropriate value.
*
* Return: void
@@ -18551,7 +18551,7 @@ check_and_validate_cache_hit_rate(hid_t file_id,
}
if ( pass ) { /* reset the hit rate */
-
+
result = H5Freset_mdc_hit_rate_stats(file_id);
if ( result < 0 ) {
@@ -18570,13 +18570,13 @@ check_and_validate_cache_hit_rate(hid_t file_id,
/* dump data to stdout if requested */
if ( ( pass ) && ( dump_data ) ) {
- HDfprintf(stdout,
+ HDfprintf(stdout,
"cache_hits: %ld, cache_accesses: %ld, hit_rate: %lf\n",
(long)cache_hits, (long)cache_accesses, hit_rate);
}
- if ( ( pass ) &&
- ( cache_accesses > min_accesses ) &&
+ if ( ( pass ) &&
+ ( cache_accesses > min_accesses ) &&
( hit_rate < min_hit_rate ) ) {
pass = FALSE;
@@ -18591,15 +18591,15 @@ check_and_validate_cache_hit_rate(hid_t file_id,
/*-------------------------------------------------------------------------
* Function: check_and_validate_cache_size()
*
- * Purpose: Use the API function to get the cache size data. Verify
- * that the values returned by the API call agree with
+ * Purpose: Use the API function to get the cache size data. Verify
+ * that the values returned by the API call agree with
* the cache internal data structures.
*
* Return size data in the locations specified by the pointer
- * parameters if these parameters are not NULL. Print the
+ * parameters if these parameters are not NULL. Print the
* data to stdout if requested.
*
- * If an error is detected, set pass to FALSE, and set
+ * If an error is detected, set pass to FALSE, and set
* failure_mssg to an appropriate value.
*
* Return: void
@@ -18715,7 +18715,7 @@ check_and_validate_cache_size(hid_t file_id,
/* dump data to stdout if requested */
if ( ( pass ) && ( dump_data ) ) {
- HDfprintf(stdout,
+ HDfprintf(stdout,
"max_sz: %ld, min_clean_sz: %ld, cur_sz: %ld, cur_ent: %ld\n",
(long)max_size, (long)min_clean_size, (long)cur_size,
(long)cur_num_entries);
@@ -18729,7 +18729,7 @@ check_and_validate_cache_size(hid_t file_id,
/*-------------------------------------------------------------------------
* Function: mdc_api_call_smoke_check()
*
- * Purpose:
+ * Purpose:
*
* Return: void
*
@@ -18749,7 +18749,7 @@ check_and_validate_cache_size(hid_t file_id,
static void
mdc_api_call_smoke_check(void)
{
- const char * fcn_name = "mdc_api_call_smoke_check()";
+ const char * fcn_name = "mdc_api_call_smoke_check()";
char filename[512];
hbool_t valid_chunk;
hbool_t dump_hit_rate = FALSE;
@@ -18852,14 +18852,14 @@ mdc_api_call_smoke_check(void)
* configured as per the default both by looking at its internal
* configuration, and via the H5Fget_mdc_config() call.
*
- * Then set the cache to mod_config_1, which fixes cache size at
- * 500000 bytes, and turns off automatic cache resize.
+ * Then set the cache to mod_config_1, which fixes cache size at
+ * 500000 bytes, and turns off automatic cache resize.
*/
/* setup the file name */
if ( pass ) {
- if ( h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename))
+ if ( h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename))
== NULL ) {
pass = FALSE;
@@ -19003,13 +19003,13 @@ mdc_api_call_smoke_check(void)
/* initialize all datasets on a round robin basis */
i = 0;
- while ( ( pass ) && ( i < DSET_SIZE ) )
+ while ( ( pass ) && ( i < DSET_SIZE ) )
{
j = 0;
- while ( ( pass ) && ( j < DSET_SIZE ) )
+ while ( ( pass ) && ( j < DSET_SIZE ) )
{
m = 0;
- while ( ( pass ) && ( m < NUM_DSETS ) )
+ while ( ( pass ) && ( m < NUM_DSETS ) )
{
/* initialize the slab */
for ( k = 0; k < CHUNK_SIZE; k++ )
@@ -19049,10 +19049,10 @@ mdc_api_call_smoke_check(void)
j += CHUNK_SIZE;
}
- /* check the cache hit rate, and reset the counters.
- * Hit rate should be just about unity here, so we will just
+ /* check the cache hit rate, and reset the counters.
+ * Hit rate should be just about unity here, so we will just
* get the data and (possibly) print it without checking it
- * beyond ensuring that it agrees with the cache internal
+ * beyond ensuring that it agrees with the cache internal
* data structures.
*
* similarly, check cache size.
@@ -19063,7 +19063,7 @@ mdc_api_call_smoke_check(void)
check_and_validate_cache_hit_rate(file_id, NULL, dump_hit_rate,
min_accesses, min_hit_rate);
- check_and_validate_cache_size(file_id, NULL, NULL, NULL, NULL,
+ check_and_validate_cache_size(file_id, NULL, NULL, NULL, NULL,
dump_cache_size);
}
@@ -19107,7 +19107,7 @@ mdc_api_call_smoke_check(void)
/* read the chunk from file */
if ( pass ) {
-
+
status = H5Dread(dataset_ids[m], H5T_NATIVE_INT, memspace_id,
filespace_ids[m], H5P_DEFAULT, data_chunk);
@@ -19128,17 +19128,17 @@ mdc_api_call_smoke_check(void)
{
if ( data_chunk[k][l]
!=
- ((DSET_SIZE * DSET_SIZE * m) +
+ ((DSET_SIZE * DSET_SIZE * m) +
(DSET_SIZE * (i + k)) + j + l) ) {
valid_chunk = FALSE;
#if 0 /* this will be useful from time to time -- lets keep it*/
- HDfprintf(stdout,
+ HDfprintf(stdout,
"data_chunk[%0d][%0d] = %0d, expect %0d.\n",
- k, l, data_chunk[k][l],
+ k, l, data_chunk[k][l],
((DSET_SIZE * DSET_SIZE * m) +
(DSET_SIZE * (i + k)) + j + l));
- HDfprintf(stdout,
+ HDfprintf(stdout,
"m = %d, i = %d, j = %d, k = %d, l = %d\n",
m, i, j, k, l);
#endif
@@ -19162,7 +19162,7 @@ mdc_api_call_smoke_check(void)
check_and_validate_cache_hit_rate(file_id, NULL, dump_hit_rate,
min_accesses, min_hit_rate);
- check_and_validate_cache_size(file_id, NULL, NULL, NULL, NULL,
+ check_and_validate_cache_size(file_id, NULL, NULL, NULL, NULL,
dump_cache_size);
}
@@ -19171,7 +19171,7 @@ mdc_api_call_smoke_check(void)
/* close the file spaces we are done with */
i = 1;
- while ( ( pass ) && ( i < NUM_DSETS ) )
+ while ( ( pass ) && ( i < NUM_DSETS ) )
{
if ( H5Sclose(filespace_ids[i]) < 0 ) {
@@ -19231,7 +19231,7 @@ mdc_api_call_smoke_check(void)
/* read the chunk from file */
if ( pass ) {
-
+
status = H5Dread(dataset_ids[m], H5T_NATIVE_INT, memspace_id,
filespace_ids[m], H5P_DEFAULT, data_chunk);
@@ -19252,14 +19252,14 @@ mdc_api_call_smoke_check(void)
{
if ( data_chunk[k][l]
!=
- ((DSET_SIZE * DSET_SIZE * m) +
+ ((DSET_SIZE * DSET_SIZE * m) +
(DSET_SIZE * (i + k)) + j + l) ) {
valid_chunk = FALSE;
}
#if 0 /* this will be useful from time to time -- lets keep it */
HDfprintf(stdout, "data_chunk[%0d][%0d] = %0d, expect %0d.\n",
- k, l, data_chunk[k][l],
+ k, l, data_chunk[k][l],
((DSET_SIZE * DSET_SIZE * m) +
(DSET_SIZE * (i + k)) + j + l));
#endif
@@ -19282,7 +19282,7 @@ mdc_api_call_smoke_check(void)
check_and_validate_cache_hit_rate(file_id, NULL, dump_hit_rate,
min_accesses, min_hit_rate);
- check_and_validate_cache_size(file_id, NULL, NULL, NULL, NULL,
+ check_and_validate_cache_size(file_id, NULL, NULL, NULL, NULL,
dump_cache_size);
}
@@ -19337,7 +19337,7 @@ mdc_api_call_smoke_check(void)
pass = FALSE;
failure_mssg = "H5Fclose() failed.\n";
- }
+ }
else if ( HDremove(filename) < 0 ) {
pass = FALSE;
@@ -19348,7 +19348,7 @@ mdc_api_call_smoke_check(void)
if ( pass ) { PASSED(); } else { H5_FAILED(); }
if ( ! pass )
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
+ HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
fcn_name, failure_mssg);
} /* mdc_api_call_smoke_check() */
@@ -20080,7 +20080,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
static void
check_fapl_mdc_api_errs(void)
{
- const char * fcn_name = "check_fapl_mdc_api_errs()";
+ const char * fcn_name = "check_fapl_mdc_api_errs()";
static char msg[128];
int i;
herr_t result;
@@ -20108,8 +20108,8 @@ check_fapl_mdc_api_errs(void)
}
}
- /* Create a FAPL for test purposes, and veify that it contains the
- * default MDC configuration.
+ /* Create a FAPL for test purposes, and veify that it contains the
+ * default MDC configuration.
*/
if ( pass ) {
@@ -20134,8 +20134,8 @@ check_fapl_mdc_api_errs(void)
if ( pass ) {
- H5E_BEGIN_TRY {
- result = H5Pget_mdc_config(fapl_id, NULL);
+ H5E_BEGIN_TRY {
+ result = H5Pget_mdc_config(fapl_id, NULL);
} H5E_END_TRY;
if ( result >= 0 ) {
@@ -20150,8 +20150,8 @@ check_fapl_mdc_api_errs(void)
scratch.version = -1; /* a convenient, invalid value */
if ( pass ) {
- H5E_BEGIN_TRY {
- result = H5Pget_mdc_config(fapl_id, &scratch);
+ H5E_BEGIN_TRY {
+ result = H5Pget_mdc_config(fapl_id, &scratch);
} H5E_END_TRY;
if ( result >= 0 ) {
@@ -20168,7 +20168,7 @@ check_fapl_mdc_api_errs(void)
scratch.version = H5C__CURR_AUTO_SIZE_CTL_VER;
if ( pass ) {
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY {
result = H5Pset_mdc_config(-1, &default_config);
} H5E_END_TRY;
@@ -20181,7 +20181,7 @@ check_fapl_mdc_api_errs(void)
if ( pass ) {
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY {
result = H5Pset_mdc_config(fapl_id, NULL);
} H5E_END_TRY;
@@ -20195,7 +20195,7 @@ check_fapl_mdc_api_errs(void)
i = 0;
while ( ( pass ) && ( i < NUM_INVALID_CONFIGS ) )
{
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY {
result = H5Pset_mdc_config(fapl_id, &(invalid_configs[i]));
} H5E_END_TRY;
@@ -20224,7 +20224,7 @@ check_fapl_mdc_api_errs(void)
if ( pass ) { PASSED(); } else { H5_FAILED(); }
if ( ! pass )
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
+ HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
fcn_name, failure_mssg);
} /* check_fapl_mdc_api_errs() */
@@ -20249,7 +20249,7 @@ check_fapl_mdc_api_errs(void)
static void
check_file_mdc_api_errs(void)
{
- const char * fcn_name = "check_file_mdc_api_errs()";
+ const char * fcn_name = "check_file_mdc_api_errs()";
char filename[512];
static char msg[128];
int i;
@@ -20267,14 +20267,14 @@ check_file_mdc_api_errs(void)
pass = TRUE;
- /* Create a file for test purposes, and veify that its metadata cache
- * set to the default MDC configuration.
+ /* Create a file for test purposes, and veify that its metadata cache
+ * set to the default MDC configuration.
*/
/* setup the file name */
if ( pass ) {
- if ( h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename))
+ if ( h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename))
== NULL ) {
pass = FALSE;
@@ -20301,8 +20301,8 @@ check_file_mdc_api_errs(void)
scratch.version = H5C__CURR_AUTO_SIZE_CTL_VER;
if ( pass ) {
- H5E_BEGIN_TRY {
- result = H5Fget_mdc_config(-1, &scratch);
+ H5E_BEGIN_TRY {
+ result = H5Fget_mdc_config(-1, &scratch);
} H5E_END_TRY;
if ( result >= 0 ) {
@@ -20314,8 +20314,8 @@ check_file_mdc_api_errs(void)
if ( pass ) {
- H5E_BEGIN_TRY {
- result = H5Fget_mdc_config(file_id, NULL);
+ H5E_BEGIN_TRY {
+ result = H5Fget_mdc_config(file_id, NULL);
} H5E_END_TRY;
if ( result >= 0 ) {
@@ -20328,8 +20328,8 @@ check_file_mdc_api_errs(void)
scratch.version = -1; /* a convenient, invalid value */
if ( pass ) {
- H5E_BEGIN_TRY {
- result = H5Fget_mdc_config(file_id, &scratch);
+ H5E_BEGIN_TRY {
+ result = H5Fget_mdc_config(file_id, &scratch);
} H5E_END_TRY;
if ( result >= 0 ) {
@@ -20345,7 +20345,7 @@ check_file_mdc_api_errs(void)
scratch.version = H5C__CURR_AUTO_SIZE_CTL_VER;
if ( pass ) {
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY {
result = H5Fset_mdc_config(-1, &default_config);
} H5E_END_TRY;
@@ -20358,7 +20358,7 @@ check_file_mdc_api_errs(void)
if ( pass ) {
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY {
result = H5Fset_mdc_config(file_id, NULL);
} H5E_END_TRY;
@@ -20372,7 +20372,7 @@ check_file_mdc_api_errs(void)
i = 0;
while ( ( pass ) && ( i < NUM_INVALID_CONFIGS ) )
{
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY {
result = H5Fset_mdc_config(file_id, &(invalid_configs[i]));
} H5E_END_TRY;
@@ -20395,7 +20395,7 @@ check_file_mdc_api_errs(void)
/* test H5Fget_mdc_hit_rate() */
if ( pass ) {
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY {
result = H5Fget_mdc_hit_rate(-1, &hit_rate);
} H5E_END_TRY;
@@ -20408,7 +20408,7 @@ check_file_mdc_api_errs(void)
if ( pass ) {
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY {
result = H5Fget_mdc_hit_rate(file_id, NULL);
} H5E_END_TRY;
@@ -20423,14 +20423,14 @@ check_file_mdc_api_errs(void)
/* test H5Freset_mdc_hit_rate_stats() */
if ( pass ) {
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY {
result = H5Freset_mdc_hit_rate_stats(-1);
} H5E_END_TRY;
if ( result >= 0 ) {
pass = FALSE;
- failure_mssg =
+ failure_mssg =
"H5Freset_mdc_hit_rate_stats() accepted bad file_id.";
}
}
@@ -20439,8 +20439,8 @@ check_file_mdc_api_errs(void)
/* test H5Fget_mdc_size() */
if ( pass ) {
- H5E_BEGIN_TRY {
- result = H5Fget_mdc_size(-1, &max_size, &min_clean_size,
+ H5E_BEGIN_TRY {
+ result = H5Fget_mdc_size(-1, &max_size, &min_clean_size,
&cur_size, &cur_num_entries);
} H5E_END_TRY;
@@ -20454,7 +20454,7 @@ check_file_mdc_api_errs(void)
if ( pass ) {
if ( ( H5Fget_mdc_size(file_id, &max_size, NULL, NULL, NULL) < 0 ) ||
- ( H5Fget_mdc_size(file_id, NULL, &min_clean_size,
+ ( H5Fget_mdc_size(file_id, NULL, &min_clean_size,
NULL, NULL) < 0 ) ||
( H5Fget_mdc_size(file_id, NULL, NULL, &cur_size, NULL) < 0 ) ||
( H5Fget_mdc_size(file_id, NULL, NULL, NULL,
@@ -20485,7 +20485,7 @@ check_file_mdc_api_errs(void)
if ( pass ) { PASSED(); } else { H5_FAILED(); }
if ( ! pass )
- HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
+ HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
fcn_name, failure_mssg);
} /* check_file_mdc_api_errs() */
@@ -20496,9 +20496,9 @@ check_file_mdc_api_errs(void)
*
* Purpose: Run tests on the cache code contained in H5C.c
*
- * Return: Success:
+ * Return: Success:
*
- * Failure:
+ * Failure:
*
* Programmer: John Mainzer
* 6/24/04
diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c
index c258b96..993ab55 100644
--- a/test/cmpd_dset.c
+++ b/test/cmpd_dset.c
@@ -114,11 +114,11 @@ main (int argc, char *argv[])
/* Third dataset */
static s3_t s3[NX*NY];
hid_t s3_tid;
-
+
/* Fourth dataset */
static s4_t s4[NX*NY];
hid_t s4_tid;
-
+
/* Fifth dataset */
static s5_t s5[NX*NY];
hid_t s5_tid;
@@ -160,14 +160,14 @@ main (int argc, char *argv[])
}
H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_struct_opt);
}
-
+
/* Create the file */
fapl = h5_fileaccess();
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
if ((file = H5Fcreate (filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) {
goto error;
}
-
+
/* Create the data space */
if ((space = H5Screate_simple (2, dim, NULL))<0) goto error;
@@ -180,7 +180,7 @@ main (int argc, char *argv[])
* STEP 1: Save the original dataset natively.
*/
TESTING("basic compound write");
-
+
/* Initialize the dataset */
for (i=0; i<NX*NY; i++) {
s1[i].a = 8*i+0;
@@ -223,7 +223,7 @@ main (int argc, char *argv[])
* in fact, we could have used s1_tid.
*/
TESTING("basic compound read");
-
+
/* Create a data type for s2 */
if ((s2_tid = H5Tcreate (H5T_COMPOUND, sizeof(s2_t)))<0)
goto error;
@@ -235,7 +235,7 @@ main (int argc, char *argv[])
H5Tinsert (s2_tid, "e", HOFFSET(s2_t,e), H5T_NATIVE_INT)<0)
goto error;
H5Tclose(array_dt);
-
+
/* Read the data */
if (H5Dread (dataset, s2_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, s2)<0) {
goto error;
@@ -257,7 +257,7 @@ main (int argc, char *argv[])
}
}
PASSED();
-
+
/*
*######################################################################
* STEP 3: Read the dataset back into a third memory buffer. This buffer
@@ -265,7 +265,7 @@ main (int argc, char *argv[])
* data type is a struct whose members are in the opposite order.
*/
TESTING("reversal of struct members");
-
+
/* Create a data type for s3 */
if ((s3_tid = H5Tcreate (H5T_COMPOUND, sizeof(s3_t)))<0)
goto error;
@@ -277,7 +277,7 @@ main (int argc, char *argv[])
H5Tinsert (s3_tid, "e", HOFFSET(s3_t,e), H5T_NATIVE_INT)<0)
goto error;
H5Tclose(array_dt);
-
+
/* Read the data */
if (H5Dread (dataset, s3_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, s3)<0) {
goto error;
@@ -342,7 +342,7 @@ main (int argc, char *argv[])
s5[i].mid2 = 1002+4*i;
s5[i].post = 1003+4*i;
}
-
+
/* Create a data type for s5 */
if ((s5_tid = H5Tcreate (H5T_COMPOUND, sizeof(s5_t)))<0)
goto error;
@@ -354,7 +354,7 @@ main (int argc, char *argv[])
H5Tinsert (s5_tid, "e", HOFFSET(s5_t,e), H5T_NATIVE_INT))
goto error;
H5Tclose(array_dt);
-
+
/* Read the data */
if (H5Dread (dataset, s5_tid, H5S_ALL, H5S_ALL, PRESERVE, s5)<0) {
goto error;
@@ -434,7 +434,7 @@ main (int argc, char *argv[])
}
}
PASSED();
-
+
/*
*######################################################################
* STEP 7. Read the original dataset with an explicit data space. Even
@@ -445,7 +445,7 @@ main (int argc, char *argv[])
/* Create the data space */
if ((s7_sid = H5Screate_simple (2, dim, NULL))<0) goto error;
-
+
/* Read the dataset */
if (H5Dread (dataset, s2_tid, s7_sid, H5S_ALL, H5P_DEFAULT, s2)<0) {
goto error;
@@ -467,7 +467,7 @@ main (int argc, char *argv[])
}
}
PASSED();
-
+
/*
*######################################################################
@@ -533,7 +533,7 @@ main (int argc, char *argv[])
s2[i].a = s2[i].b = s2[i].d = s2[i].e = (unsigned)(-1);
s2[i].c[0] = s2[i].c[1] = s2[i].c[2] = s2[i].c[3] = (unsigned)(-1);
}
-
+
/* Read the hyperslab */
if (H5Dread (dataset, s2_tid, s8_f_sid, s8_f_sid, H5P_DEFAULT, s2)<0) {
goto error;
@@ -577,7 +577,7 @@ main (int argc, char *argv[])
}
}
PASSED();
-
+
/*
*######################################################################
* STEP 10. Same as step 9 except the memory array contains some members
@@ -591,7 +591,7 @@ main (int argc, char *argv[])
s5[i].c[0] = s5[i].c[1] = s5[i].c[2] = s5[i].c[3] = (unsigned)(-1);
s5[i].pre = s5[i].mid1 = s5[i].mid2 = s5[i].post = (unsigned)(-1);
}
-
+
/* Read the hyperslab */
if (H5Dread (dataset, s5_tid, s8_f_sid, s8_f_sid, PRESERVE, s5)<0) {
goto error;
@@ -643,14 +643,14 @@ main (int argc, char *argv[])
}
}
PASSED();
-
+
/*
*######################################################################
* Step 11: Write an array into the middle third of the dataset
* initializeing only members `b' and `d' to -1.
*/
TESTING("hyperslab part initialized write");
-
+
/* Create the memory array and initialize all fields to zero */
f_offset[0] = NX/3;
f_offset[1] = NY/3;
@@ -663,7 +663,7 @@ main (int argc, char *argv[])
for (i=0; i<h_size[0]*h_size[1]; i++) {
s11[i].b = s11[i].d = (unsigned)(-1);
}
-
+
/* Write to disk */
if (H5Dwrite (dataset, s4_tid, s8_m_sid, s8_f_sid, PRESERVE, s11)<0) {
goto error;
@@ -680,7 +680,7 @@ main (int argc, char *argv[])
for (i=0; i<NX; i++) {
for (j=0; j<NY; j++) {
s1_t *ps1 = s1 + i*NY + j;
-
+
if (ps1->a != 8*(i*NY+j)+0 ||
ps1->c[0] != 8*(i*NY+j)+2 ||
ps1->c[1] != 8*(i*NY+j)+3 ||
@@ -691,7 +691,7 @@ main (int argc, char *argv[])
puts(" Write clobbered values");
goto error;
}
-
+
if (i>=f_offset[0] &&
i<f_offset[0]+h_size[0] &&
j>=f_offset[1] &&
@@ -714,7 +714,7 @@ main (int argc, char *argv[])
}
PASSED();
-
+
/*
* Release resources.
*/
diff --git a/test/createnoenc.c b/test/createnoenc.c
index f444df6..05a2ff1 100644
--- a/test/createnoenc.c
+++ b/test/createnoenc.c
@@ -77,4 +77,4 @@ main()
H5Dclose(dset_id);
H5Sclose(space_id);
H5Fclose(file_id);
-} \ No newline at end of file
+}
diff --git a/test/dangle.c b/test/dangle.c
index 5e6919b..c80d1a9 100644
--- a/test/dangle.c
+++ b/test/dangle.c
@@ -123,10 +123,10 @@ test_dangle_dataset(H5F_close_degree_t degree)
/* Clean up temporary file */
HDremove(filename);
- PASSED();
- return 0;
-
-error:
+ PASSED();
+ return 0;
+
+error:
return 1;
}
@@ -216,10 +216,10 @@ test_dangle_group(H5F_close_degree_t degree)
/* Clean up temporary file */
HDremove(filename);
- PASSED();
- return 0;
-
-error:
+ PASSED();
+ return 0;
+
+error:
return 1;
}
@@ -313,10 +313,10 @@ test_dangle_datatype(H5F_close_degree_t degree)
/* Clean up temporary file */
HDremove(filename);
- PASSED();
- return 0;
-
-error:
+ PASSED();
+ return 0;
+
+error:
return 1;
}
@@ -421,10 +421,10 @@ test_dangle_attribute(H5F_close_degree_t degree)
/* Clean up temporary file */
HDremove(filename);
- PASSED();
- return 0;
-
-error:
+ PASSED();
+ return 0;
+
+error:
return 1;
}
diff --git a/test/dsets.c b/test/dsets.c
index 5ea5ac4..7777e43 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -91,7 +91,7 @@ const char *FILENAME[] = {
#define DSET_COMPARE_DCPL_NAME_2 "compare_dcpl_2"
#define USER_BLOCK 1024
-#define SIXTY_FOUR_KB 65536
+#define SIXTY_FOUR_KB 65536
/* Temporary filter IDs used for testing */
#define H5Z_FILTER_BOGUS 305
@@ -102,7 +102,7 @@ const char *FILENAME[] = {
#define DISABLE_FLETCHER32 0
#define ENABLE_FLETCHER32 1
#define DATA_CORRUPTED 1
-#define DATA_NOT_CORRUPTED 0
+#define DATA_NOT_CORRUPTED 0
/* Parameters for the "set local" test */
#define BOGUS2_PERM_NPARMS 2 /* Number of "permanent" parameters */
@@ -143,13 +143,13 @@ int points[DSET_DIM1][DSET_DIM2], check[DSET_DIM1][DSET_DIM2];
double points_dbl[DSET_DIM1][DSET_DIM2], check_dbl[DSET_DIM1][DSET_DIM2];
/* Local prototypes for filter functions */
-static size_t filter_bogus(unsigned int flags, size_t cd_nelmts,
+static size_t filter_bogus(unsigned int flags, size_t cd_nelmts,
const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf);
static herr_t can_apply_bogus(hid_t dcpl_id, hid_t type_id, hid_t space_id);
static herr_t set_local_bogus2(hid_t dcpl_id, hid_t type_id, hid_t space_id);
-static size_t filter_bogus2(unsigned int flags, size_t cd_nelmts,
+static size_t filter_bogus2(unsigned int flags, size_t cd_nelmts,
const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf);
-static size_t filter_corrupt(unsigned int flags, size_t cd_nelmts,
+static size_t filter_corrupt(unsigned int flags, size_t cd_nelmts,
const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf);
@@ -193,7 +193,7 @@ test_create(hid_t file)
small_dims[1] = 8;
small_space = H5Screate_simple(2, small_dims, NULL);
assert(space>=0);
-
+
/*
* Create a dataset using the default dataset creation properties. We're
* not sure what they are, so we won't check.
@@ -223,7 +223,7 @@ test_create(hid_t file)
puts(" Library allowed overwrite of existing dataset.");
goto error;
}
-
+
/*
* Open the dataset we created above and then close it. This is how
* existing datasets are accessed.
@@ -231,7 +231,7 @@ test_create(hid_t file)
if (H5Fflush(file, H5F_SCOPE_GLOBAL) < 0) goto error;
if ((dataset = H5Dopen(file, DSET_DEFAULT_NAME))<0) goto error;
if (H5Dclose(dataset) < 0) goto error;
-
+
/*
* Try opening a non-existent dataset. This should fail since new datasets
* cannot be created with this function. Temporarily turn off error
@@ -280,23 +280,23 @@ test_create(hid_t file)
/* Test dataset address. Should be undefined. */
if(H5Dget_offset(dataset)!=HADDR_UNDEF) goto error;
-
+
/*
* Close the chunked dataset.
*/
if (H5Dclose(dataset) < 0) goto error;
/*
- * Create a compact dataset, then close it.
+ * Create a compact dataset, then close it.
*/
create_parms = H5Pcreate(H5P_DATASET_CREATE);
assert(create_parms >= 0);
status = H5Pset_layout(create_parms, H5D_COMPACT);
assert(status >= 0);
status = H5Pset_alloc_time(create_parms, H5D_ALLOC_TIME_EARLY);
- assert(status >= 0);
+ assert(status >= 0);
- dataset = H5Dcreate(file, DSET_COMPACT_NAME, H5T_NATIVE_DOUBLE,
+ dataset = H5Dcreate(file, DSET_COMPACT_NAME, H5T_NATIVE_DOUBLE,
small_space, create_parms);
if(dataset < 0) goto error;
H5Pclose(create_parms);
@@ -339,11 +339,11 @@ test_simple_io(hid_t fapl)
int f;
haddr_t offset;
int rdata[DSET_DIM1][DSET_DIM2];
-
+
TESTING("simple I/O");
h5_fixname(FILENAME[4], fapl, filename, sizeof filename);
-
+
/* Initialize the dataset */
for (i = n = 0; i < DSET_DIM1; i++)
for (j = 0; j < DSET_DIM2; j++)
@@ -351,7 +351,7 @@ test_simple_io(hid_t fapl)
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0)
goto error;
-
+
/* Create the data space */
dims[0] = DSET_DIM1;
dims[1] = DSET_DIM2;
@@ -369,7 +369,7 @@ test_simple_io(hid_t fapl)
/* Test dataset address. Should be undefined. */
if(H5Dget_offset(dataset)!=HADDR_UNDEF) goto error;
-
+
/* Write the data to the dataset */
if (H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, xfer, points)<0)
goto error;
@@ -402,7 +402,7 @@ test_simple_io(hid_t fapl)
f = HDopen(filename, O_RDONLY, 0);
HDlseek(f, (off_t)offset, SEEK_SET);
HDread(f, rdata, sizeof(int)*DSET_DIM1*DSET_DIM2);
-
+
/* Check that the values read are the same as the values written */
for (i = 0; i < DSET_DIM1; i++) {
for (j = 0; j < DSET_DIM2; j++) {
@@ -413,7 +413,7 @@ test_simple_io(hid_t fapl)
goto error;
}
}
- }
+ }
HDclose(f);
@@ -429,7 +429,7 @@ error:
/*-------------------------------------------------------------------------
* Function: test_userblock_offset
*
- * Purpose: Tests H5Dget_offset when user block exists.
+ * Purpose: Tests H5Dget_offset when user block exists.
*
* Return: Success: 0
*
@@ -452,17 +452,17 @@ test_userblock_offset(hid_t fapl)
int f;
haddr_t offset;
int rdata[DSET_DIM1][DSET_DIM2];
-
+
TESTING("dataset offset with user block");
-
+
h5_fixname(FILENAME[2], fapl, filename, sizeof filename);
-
+
if((fcpl=H5Pcreate(H5P_FILE_CREATE))<0) goto error;
if(H5Pset_userblock(fcpl, (hsize_t)USER_BLOCK)<0) goto error;
-
+
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl))<0)
goto error;
-
+
/* Create the data space */
dims[0] = DSET_DIM1;
dims[1] = DSET_DIM2;
@@ -487,7 +487,7 @@ test_userblock_offset(hid_t fapl)
f = HDopen(filename, O_RDONLY, 0);
HDlseek(f, (off_t)offset, SEEK_SET);
HDread(f, rdata, sizeof(int)*DSET_DIM1*DSET_DIM2);
-
+
/* Check that the values read are the same as the values written */
for (i = 0; i < DSET_DIM1; i++) {
for (j = 0; j < DSET_DIM2; j++) {
@@ -498,7 +498,7 @@ test_userblock_offset(hid_t fapl)
goto error;
}
}
- }
+ }
HDclose(f);
@@ -513,17 +513,17 @@ error:
/*-------------------------------------------------------------------------
* Function: test_compact_io
*
- * Purpose: Tests compact dataset I/O. That is, reading and writing a
- * complete multi-dimensional array without data type or data
- * space conversions, without compression, and store in
+ * Purpose: Tests compact dataset I/O. That is, reading and writing a
+ * complete multi-dimensional array without data type or data
+ * space conversions, without compression, and store in
* compact dataset.
*
* Return: Success: 0
*
* Failure: -1
*
- * Programmer: Raymond Lu
- * August 8, 2002
+ * Programmer: Raymond Lu
+ * August 8, 2002
*
* Modifications:
*
@@ -548,7 +548,7 @@ test_compact_io(hid_t fapl)
wbuf[i][j] = n++;
}
}
-
+
/* Create a small data space for compact dataset */
dims[0] = 16;
dims[1] = 8;
@@ -565,23 +565,23 @@ test_compact_io(hid_t fapl)
assert(plist >= 0);
status = H5Pset_layout(plist, H5D_COMPACT);
assert(status >= 0);
- status = H5Pset_alloc_time(plist, H5D_ALLOC_TIME_EARLY);
+ status = H5Pset_alloc_time(plist, H5D_ALLOC_TIME_EARLY);
assert(status >= 0);
/* Create and write to a compact dataset */
- if((dataset = H5Dcreate(file, DSET_COMPACT_IO_NAME, H5T_NATIVE_INT, space,
+ if((dataset = H5Dcreate(file, DSET_COMPACT_IO_NAME, H5T_NATIVE_INT, space,
plist))<0)
goto error;
/* Test dataset address. Should be undefined. */
if(H5Dget_offset(dataset)!=HADDR_UNDEF) goto error;
-
+
if(H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wbuf)<0)
goto error;
/* Test dataset address. Should be undefined. */
if(H5Dget_offset(dataset)!=HADDR_UNDEF) goto error;
-
+
/* Close file */
H5Sclose(space);
H5Pclose(plist);
@@ -589,7 +589,7 @@ test_compact_io(hid_t fapl)
H5Fclose(file);
/*
- * Open the file and check data
+ * Open the file and check data
*/
if((file=H5Fopen(filename, H5F_ACC_RDONLY, fapl))<0)
goto error;
@@ -620,7 +620,7 @@ test_compact_io(hid_t fapl)
error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
* Function: test_max_compact
@@ -631,8 +631,8 @@ test_compact_io(hid_t fapl)
*
* Failure: -1
*
- * Programmer: Raymond Lu
- * August 8, 2002
+ * Programmer: Raymond Lu
+ * August 8, 2002
*
* Modifications:
*
@@ -655,14 +655,14 @@ test_max_compact(hid_t fapl)
/* Initialize data */
compact_size = (SIXTY_FOUR_KB-64)/sizeof(int);
-
+
wbuf = (int*)HDmalloc(sizeof(int)*(size_t)compact_size);
rbuf = (int*)HDmalloc(sizeof(int)*(size_t)compact_size);
n=0;
for(i=0; i<(int)compact_size; i++)
wbuf[i] = n++;
-
+
/* Create a small data space for compact dataset */
dims[0] = compact_size;
space = H5Screate_simple(1, dims, NULL);
@@ -680,7 +680,7 @@ test_max_compact(hid_t fapl)
assert(status >= 0);
/* Create and write to a compact dataset */
- if((dataset = H5Dcreate(file, DSET_COMPACT_MAX_NAME, H5T_NATIVE_INT, space,
+ if((dataset = H5Dcreate(file, DSET_COMPACT_MAX_NAME, H5T_NATIVE_INT, space,
plist))<0)
goto error;
@@ -694,7 +694,7 @@ test_max_compact(hid_t fapl)
H5Fclose(file);
/*
- * Open the file and check data
+ * Open the file and check data
*/
if((file=H5Fopen(filename, H5F_ACC_RDONLY, fapl))<0)
goto error;
@@ -720,7 +720,7 @@ test_max_compact(hid_t fapl)
/* Test compact dataset of size 64KB */
-
+
/* Create a data space for compact dataset */
compact_size = SIXTY_FOUR_KB/sizeof(int);
dims[0] = compact_size;
@@ -741,7 +741,7 @@ test_max_compact(hid_t fapl)
H5E_BEGIN_TRY {
H5Dcreate(file, DSET_COMPACT_MAX2_NAME, H5T_NATIVE_INT, space, plist);
} H5E_END_TRY;
-
+
/* Close file */
H5Sclose(space);
H5Pclose(plist);
@@ -782,13 +782,13 @@ test_conv_buffer(hid_t fid)
} CmpField;
typedef struct
- {
+ {
float b[DIM2];
double c[DIM3];
} CmpFieldR;
herr_t status = -1;
- int j, k, l;
+ int j, k, l;
CmpField *cf;
CmpFieldR *cfrR;
@@ -804,21 +804,21 @@ test_conv_buffer(hid_t fid)
size_t size;
TESTING("data type conversion buffer size");
-
+
cf = (CmpField *)calloc(1, sizeof(CmpField));
- /* Populate the data members */
- for (j = 0; j < DIM1; j++)
- for (k = 0; k < DIM2; k++)
+ /* Populate the data members */
+ for (j = 0; j < DIM1; j++)
+ for (k = 0; k < DIM2; k++)
for (l = 0; l < DIM3; l++)
cf->a[j][k][l] = 10*(j+1) + l + k;
for (j = 0; j < DIM2; j++)
cf->b[j] = (float)(100.*(j+1) + 0.01*j);
-
+
for (j = 0; j < DIM3; j++)
cf->c[j] = 100.*(j+1) + 0.02*j;
-
+
/* Create data space */
if((space=H5Screate(H5S_SCALAR))<0) goto error;
@@ -829,7 +829,7 @@ test_conv_buffer(hid_t fid)
dimsa[2] = DIM3;
dimsb[0] = DIM2;
dimsc[0] = DIM3;
-
+
/* Create the memory data type */
if((ctype1 = H5Tcreate(H5T_COMPOUND, sizeof (CmpField)))<0) goto error;
@@ -844,12 +844,12 @@ test_conv_buffer(hid_t fid)
/* Create the dataset */
if((dataset = H5Dcreate(fid, DSET_CONV_BUF_NAME, ctype1, space, H5P_DEFAULT))<0) goto error;
if(H5Dwrite(dataset, ctype1, H5S_ALL, H5S_ALL, H5P_DEFAULT, cf)<0) goto error;
-
+
if((ctype2 = H5Tcreate(H5T_COMPOUND, sizeof (CmpFieldR)))<0) goto error;
if((arr_type4 = H5Tarray_create(H5T_NATIVE_FLOAT, 1, dimsb, NULL))<0) goto error;
if((arr_type5 = H5Tarray_create(H5T_NATIVE_DOUBLE, 1, dimsc, NULL))<0) goto error;
-
+
if(H5Tinsert (ctype2, "B", HOFFSET(CmpFieldR, b), arr_type4)<0) goto error;
if(H5Tinsert (ctype2, "C", HOFFSET(CmpFieldR, c), arr_type5)<0) goto error;
@@ -857,7 +857,7 @@ test_conv_buffer(hid_t fid)
cfrR = (CmpFieldR *)calloc(1, sizeof(CmpFieldR));
if(H5Dread(dataset, ctype2, H5S_ALL, H5S_ALL, H5P_DEFAULT, cfrR)<0) goto error;
- /* Read should fail since conversion buffer isn't big enough */
+ /* Read should fail since conversion buffer isn't big enough */
xfer_list = H5Pcreate (H5P_DATASET_XFER);
size = (DIM2*DIM3*(sizeof(int))+ DIM2*(sizeof(float))+
DIM3*(sizeof(double)));
@@ -894,14 +894,14 @@ test_conv_buffer(hid_t fid)
if(cf)
HDfree(cf);
if(cfrR)
- HDfree(cfrR);
+ HDfree(cfrR);
puts(" PASSED");
return(0);
error:
- return -1;
+ return -1;
}
-
+
/*-------------------------------------------------------------------------
* Function: test_tconv
@@ -933,7 +933,7 @@ test_tconv(hid_t file)
assert (in);
TESTING("data type conversion");
-
+
/* Initialize the dataset */
for (i = 0; i < 1000000; i++) {
out[i*4+0] = 0x11;
@@ -1035,7 +1035,7 @@ can_apply_bogus(hid_t UNUSED dcpl_id, hid_t type_id, hid_t UNUSED space_id)
*-------------------------------------------------------------------------
*/
static size_t
-filter_bogus(unsigned int UNUSED flags, size_t UNUSED cd_nelmts,
+filter_bogus(unsigned int UNUSED flags, size_t UNUSED cd_nelmts,
const unsigned int UNUSED *cd_values, size_t nbytes,
size_t UNUSED *buf_size, void UNUSED **buf)
{
@@ -1120,7 +1120,7 @@ set_local_bogus2(hid_t dcpl_id, hid_t type_id, hid_t UNUSED space_id)
*-------------------------------------------------------------------------
*/
static size_t
-filter_bogus2(unsigned int flags, size_t cd_nelmts,
+filter_bogus2(unsigned int flags, size_t cd_nelmts,
const unsigned int *cd_values, size_t nbytes,
size_t *buf_size, void **buf)
{
@@ -1173,11 +1173,11 @@ const H5Z_class_t H5Z_CORRUPT[1] = {{
/*-------------------------------------------------------------------------
- * Function: filter_corrupt
+ * Function: filter_corrupt
*
- * Purpose: For testing Fletcher32 checksum. modify data slightly during
- * writing so that when data is read back, the checksum should
- * fail.
+ * Purpose: For testing Fletcher32 checksum. modify data slightly during
+ * writing so that when data is read back, the checksum should
+ * fail.
*
* Return: Success: Data chunk size
*
@@ -1191,7 +1191,7 @@ const H5Z_class_t H5Z_CORRUPT[1] = {{
*-------------------------------------------------------------------------
*/
static size_t
-filter_corrupt(unsigned int flags, size_t cd_nelmts,
+filter_corrupt(unsigned int flags, size_t cd_nelmts,
const unsigned int *cd_values, size_t nbytes,
size_t *buf_size, void **buf)
{
@@ -1201,7 +1201,7 @@ filter_corrupt(unsigned int flags, size_t cd_nelmts,
unsigned int length;
unsigned int value;
void *data;
-
+
if (cd_nelmts!=3 || !cd_values)
return 0;
offset = cd_values[0];
@@ -1215,14 +1215,14 @@ filter_corrupt(unsigned int flags, size_t cd_nelmts,
if (flags & H5Z_FLAG_REVERSE) { /* Varify data is actually corrupted during read */
dst += offset;
- if(HDmemcmp(data, dst, length)!=0) return 0;
+ if(HDmemcmp(data, dst, length)!=0) return 0;
*buf_size = nbytes;
ret_value = nbytes;
} else { /* Write corrupted data */
dst += offset;
HDmemcpy(dst, data, length);
*buf_size = nbytes;
- ret_value = *buf_size;
+ ret_value = *buf_size;
}
if(data)
@@ -1235,9 +1235,9 @@ filter_corrupt(unsigned int flags, size_t cd_nelmts,
/*-------------------------------------------------------------------------
* Function: filter_cb_cont
*
- * Purpose: Callback function to handle checksum failure. Let it continue.
+ * Purpose: Callback function to handle checksum failure. Let it continue.
*
- * Return: continue
+ * Return: continue
*
* Programmer: Raymond Lu
* Jan 14, 2003
@@ -1246,23 +1246,23 @@ filter_corrupt(unsigned int flags, size_t cd_nelmts,
*
*-------------------------------------------------------------------------
*/
-static H5Z_cb_return_t
-filter_cb_cont(H5Z_filter_t filter, void UNUSED *buf, size_t UNUSED buf_size,
+static H5Z_cb_return_t
+filter_cb_cont(H5Z_filter_t filter, void UNUSED *buf, size_t UNUSED buf_size,
void UNUSED *op_data)
{
if(H5Z_FILTER_FLETCHER32==filter)
- return H5Z_CB_CONT;
+ return H5Z_CB_CONT;
else
- return H5Z_CB_FAIL;
+ return H5Z_CB_FAIL;
}
/*-------------------------------------------------------------------------
* Function: filter_cb_fail
*
- * Purpose: Callback function to handle checksum failure. Let it fail.
+ * Purpose: Callback function to handle checksum failure. Let it fail.
*
- * Return: fail
+ * Return: fail
*
* Programmer: Raymond Lu
* Jan 14, 2003
@@ -1271,14 +1271,14 @@ filter_cb_cont(H5Z_filter_t filter, void UNUSED *buf, size_t UNUSED buf_size,
*
*-------------------------------------------------------------------------
*/
-static H5Z_cb_return_t
-filter_cb_fail(H5Z_filter_t filter, void UNUSED *buf, size_t UNUSED buf_size,
+static H5Z_cb_return_t
+filter_cb_fail(H5Z_filter_t filter, void UNUSED *buf, size_t UNUSED buf_size,
void UNUSED *op_data)
{
if(H5Z_FILTER_FLETCHER32==filter)
- return H5Z_CB_FAIL;
+ return H5Z_CB_FAIL;
else
- return H5Z_CB_CONT;
+ return H5Z_CB_CONT;
}
@@ -1303,7 +1303,7 @@ filter_cb_fail(H5Z_filter_t filter, void UNUSED *buf, size_t UNUSED buf_size,
*-------------------------------------------------------------------------
*/
static herr_t
-test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
+test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
int corrupted, hsize_t *dset_size)
{
hid_t dataset; /* Dataset ID */
@@ -1337,7 +1337,7 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
}
TESTING(" filters (setup)");
-
+
/* Check if all the filters are available */
if(H5Pall_filters_avail(dcpl)!=TRUE) {
H5_FAILED();
@@ -1347,18 +1347,18 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
/* Create the dataset */
if ((dataset = H5Dcreate(fid, name, H5T_NATIVE_INT, sid,
- dcpl))<0) goto error;
+ dcpl))<0) goto error;
PASSED();
/*----------------------------------------------------------------------
* STEP 1: Read uninitialized data. It should be zero.
- *----------------------------------------------------------------------
+ *----------------------------------------------------------------------
*/
TESTING(" filters (uninitialized read)");
if (H5Dread (dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check)<0)
goto error;
-
+
for (i=0; i<size[0]; i++) {
for (j=0; j<size[1]; j++) {
if (0!=check[i][j]) {
@@ -1375,10 +1375,10 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
/*----------------------------------------------------------------------
* STEP 2: Test filters by setting up a chunked dataset and writing
* to it.
- *----------------------------------------------------------------------
+ *----------------------------------------------------------------------
*/
TESTING(" filters (write)");
-
+
for (i=n=0; i<size[0]; i++) {
for (j=0; j<size[1]; j++) {
points[i][j] = (int)(n++);
@@ -1387,14 +1387,14 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
if (H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, write_dxpl, points)<0)
TEST_ERROR;
-
+
if((*dset_size=H5Dget_storage_size(dataset))==0) TEST_ERROR;
PASSED();
/*----------------------------------------------------------------------
* STEP 3: Try to read the data we just wrote.
- *----------------------------------------------------------------------
+ *----------------------------------------------------------------------
*/
TESTING(" filters (read)");
@@ -1407,12 +1407,12 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
} H5E_END_TRY;
if(status>=0) TEST_ERROR;
- /* Callback decides to continue inspite data is corrupted. */
+ /* Callback decides to continue inspite data is corrupted. */
if(H5Pset_filter_callback(dxpl, filter_cb_cont, NULL)<0) TEST_ERROR;
if(H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check)<0)
TEST_ERROR;
-
- /* Callback decides to fail when data is corrupted. */
+
+ /* Callback decides to fail when data is corrupted. */
if(H5Pset_filter_callback(write_dxpl, filter_cb_fail, NULL)<0) TEST_ERROR;
/* (Use the "write" DXPL in order to make certain corruption is seen) */
H5E_BEGIN_TRY {
@@ -1437,7 +1437,7 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
}
}
}
-
+
PASSED();
/*----------------------------------------------------------------------
@@ -1445,10 +1445,10 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
* random thus not very compressible, and will cause the chunks to move
* around as they grow. We only change values for the left half of the
* dataset although we rewrite the whole thing.
- *----------------------------------------------------------------------
+ *----------------------------------------------------------------------
*/
TESTING(" filters (modify)");
-
+
for (i=0; i<size[0]; i++) {
for (j=0; j<size[1]/2; j++) {
points[i][j] = (int)HDrandom ();
@@ -1456,21 +1456,21 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
}
if (H5Dwrite (dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, write_dxpl, points)<0)
TEST_ERROR;
-
+
if(corrupted) {
- /* Default behavior is failure when data is corrupted. */
+ /* Default behavior is failure when data is corrupted. */
/* (Use the "write" DXPL in order to make certain corruption is seen) */
H5E_BEGIN_TRY {
status=H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, write_dxpl, check);
} H5E_END_TRY;
if(status>=0) TEST_ERROR;
- /* Callback decides to continue inspite data is corrupted. */
+ /* Callback decides to continue inspite data is corrupted. */
if(H5Pset_filter_callback(dxpl, filter_cb_cont, NULL)<0) TEST_ERROR;
if(H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check)<0)
TEST_ERROR;
-
- /* Callback decides to fail when data is corrupted. */
+
+ /* Callback decides to fail when data is corrupted. */
if(H5Pset_filter_callback(write_dxpl, filter_cb_fail, NULL)<0) TEST_ERROR;
/* (Use the "write" DXPL in order to make certain corruption is seen) */
H5E_BEGIN_TRY {
@@ -1495,7 +1495,7 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
}
}
}
-
+
if((*dset_size=H5Dget_storage_size(dataset))==0) TEST_ERROR;
PASSED();
@@ -1503,27 +1503,27 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
* STEP 5: Close the dataset and then open it and read it again. This
* insures that the filters message is picked up properly from the
* object header.
- *----------------------------------------------------------------------
+ *----------------------------------------------------------------------
*/
TESTING(" filters (re-open)");
-
+
if (H5Dclose (dataset)<0) TEST_ERROR;
if ((dataset = H5Dopen (fid, name))<0) TEST_ERROR;
-
+
if(corrupted) {
- /* Default behavior is failure when data is corrupted. */
+ /* Default behavior is failure when data is corrupted. */
/* (Use the "write" DXPL in order to make certain corruption is seen) */
H5E_BEGIN_TRY {
status=H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, write_dxpl, check);
} H5E_END_TRY;
if(status>=0) TEST_ERROR;
- /* Callback decides to continue inspite data is corrupted. */
+ /* Callback decides to continue inspite data is corrupted. */
if(H5Pset_filter_callback(dxpl, filter_cb_cont, NULL)<0) TEST_ERROR;
if(H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check)<0)
TEST_ERROR;
-
- /* Callback decides to fail when data is corrupted. */
+
+ /* Callback decides to fail when data is corrupted. */
if(H5Pset_filter_callback(write_dxpl, filter_cb_fail, NULL)<0) TEST_ERROR;
/* (Use the "write" DXPL in order to make certain corruption is seen) */
H5E_BEGIN_TRY {
@@ -1547,15 +1547,15 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
}
}
}
-
+
PASSED();
-
+
/*----------------------------------------------------------------------
* STEP 6: Test partial I/O by writing to and then reading from a
* hyperslab of the dataset. The hyperslab does not line up on chunk
* boundaries (we know that case already works from above tests).
- *----------------------------------------------------------------------
+ *----------------------------------------------------------------------
*/
TESTING(" filters (partial I/O)");
@@ -1569,21 +1569,21 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
/* (Use the "read" DXPL because partial I/O on corrupted data test needs to ignore errors during writing) */
if (H5Dwrite (dataset, H5T_NATIVE_INT, sid, sid, dxpl, points)<0)
TEST_ERROR;
-
+
if(corrupted) {
- /* Default behavior is failure when data is corrupted. */
+ /* Default behavior is failure when data is corrupted. */
/* (Use the "write" DXPL in order to make certain corruption is seen) */
H5E_BEGIN_TRY {
status=H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, write_dxpl, check);
} H5E_END_TRY;
if(status>=0) TEST_ERROR;
- /* Callback decides to continue inspite data is corrupted. */
+ /* Callback decides to continue inspite data is corrupted. */
if(H5Pset_filter_callback(dxpl, filter_cb_cont, NULL)<0) TEST_ERROR;
if(H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check)<0)
TEST_ERROR;
-
- /* Callback decides to fail when data is corrupted. */
+
+ /* Callback decides to fail when data is corrupted. */
if(H5Pset_filter_callback(write_dxpl, filter_cb_fail, NULL)<0) TEST_ERROR;
/* (Use the "write" DXPL in order to make certain corruption is seen) */
H5E_BEGIN_TRY {
@@ -1593,7 +1593,7 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
} else {
if (H5Dread (dataset, H5T_NATIVE_INT, sid, sid, dxpl, check)<0)
TEST_ERROR;
-
+
/* Check that the values read are the same as the values written */
for (i=0; i<hs_size[0]; i++) {
for (j=0; j<hs_size[1]; j++) {
@@ -1617,7 +1617,7 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
PASSED();
/* Get the storage size of the dataset */
- if((*dset_size=H5Dget_storage_size(dataset))==0) goto error;
+ if((*dset_size=H5Dget_storage_size(dataset))==0) goto error;
/* Clean up objects used for this test */
if (H5Dclose (dataset)<0) goto error;
if (H5Sclose (sid)<0) goto error;
@@ -1765,13 +1765,13 @@ error:
/*-------------------------------------------------------------------------
* Function: test_get_filter_info
*
- * Purpose: Tests the H5Zget_filter_info function.
+ * Purpose: Tests the H5Zget_filter_info function.
*
* Return: Success: 0
* Failure: -1
*
- * Programmer: Nat Furrer and James Laird
- * Thursday, June 10, 2004
+ * Programmer: Nat Furrer and James Laird
+ * Thursday, June 10, 2004
*
* Modifications:
*
@@ -1786,7 +1786,7 @@ test_get_filter_info(void)
TESTING("H5Zget_filter_info");
/* Verify that each filter is reported as having the right combination
- * of encoder and decoder.
+ * of encoder and decoder.
*/
#ifdef H5_HAVE_FILTER_FLETCHER32
if(H5Zget_filter_info(H5Z_FILTER_FLETCHER32, &flags) < 0) TEST_ERROR
@@ -1799,7 +1799,7 @@ test_get_filter_info(void)
#ifdef H5_HAVE_FILTER_SHUFFLE
if(H5Zget_filter_info(H5Z_FILTER_SHUFFLE, &flags) < 0) TEST_ERROR
- if(((flags & H5Z_FILTER_CONFIG_ENCODE_ENABLED) == 0) ||
+ if(((flags & H5Z_FILTER_CONFIG_ENCODE_ENABLED) == 0) ||
((flags & H5Z_FILTER_CONFIG_DECODE_ENABLED) == 0))
TEST_ERROR
#endif
@@ -1807,7 +1807,7 @@ test_get_filter_info(void)
#ifdef H5_HAVE_FILTER_DEFLATE
if(H5Zget_filter_info(H5Z_FILTER_DEFLATE, &flags) < 0) TEST_ERROR
- if(((flags & H5Z_FILTER_CONFIG_ENCODE_ENABLED) == 0) ||
+ if(((flags & H5Z_FILTER_CONFIG_ENCODE_ENABLED) == 0) ||
((flags & H5Z_FILTER_CONFIG_DECODE_ENABLED) == 0))
TEST_ERROR
#endif
@@ -1816,12 +1816,12 @@ test_get_filter_info(void)
if(H5Zget_filter_info(H5Z_FILTER_SZIP, &flags) < 0) TEST_ERROR
if(SZ_encoder_enabled()) {
- if(((flags & H5Z_FILTER_CONFIG_ENCODE_ENABLED) == 0) ||
+ if(((flags & H5Z_FILTER_CONFIG_ENCODE_ENABLED) == 0) ||
((flags & H5Z_FILTER_CONFIG_DECODE_ENABLED) == 0))
TEST_ERROR
} /* end if */
else {
- if(((flags & H5Z_FILTER_CONFIG_ENCODE_ENABLED) != 0) ||
+ if(((flags & H5Z_FILTER_CONFIG_ENCODE_ENABLED) != 0) ||
((flags & H5Z_FILTER_CONFIG_DECODE_ENABLED) == 0))
TEST_ERROR
} /* end else */
@@ -1896,10 +1896,10 @@ test_filters(hid_t file)
#if (defined H5_HAVE_FILTER_DEFLATE | defined H5_HAVE_FILTER_SZIP) && defined H5_HAVE_FILTER_SHUFFLE && defined H5_HAVE_FILTER_FLETCHER32
hsize_t combo_size; /* Size of dataset with shuffle+deflate filter */
#endif /* H5_HAVE_FILTER_DEFLATE && H5_HAVE_FILTER_SHUFFLE && H5_HAVE_FILTER_FLETCHER32 */
-
+
/* test the H5Zget_filter_info function */
if(test_get_filter_info() < 0) goto error;
-
+
/*----------------------------------------------------------
* STEP 0: Test null I/O filter by itself.
*----------------------------------------------------------
@@ -1993,7 +1993,7 @@ test_filters(hid_t file)
if ( h5_szip_can_encode() == 1) {
if((dc = H5Pcreate(H5P_DATASET_CREATE))<0) goto error;
if (H5Pset_chunk (dc, 2, chunk_size)<0) goto error;
-
+
puts("");
if (H5Pset_szip(dc, szip_options_mask, szip_pixels_per_block)<0) goto error;
if(test_filter_internal(file,DSET_SZIP_NAME,dc,DISABLE_FLETCHER32,DATA_NOT_CORRUPTED,&szip_size)<0) goto error;
@@ -2046,7 +2046,7 @@ test_filters(hid_t file)
* STEP 5: Test shuffle + deflate + checksum in any order.
*----------------------------------------------------------
*/
-#if defined H5_HAVE_FILTER_DEFLATE && defined H5_HAVE_FILTER_SHUFFLE && defined H5_HAVE_FILTER_FLETCHER32
+#if defined H5_HAVE_FILTER_DEFLATE && defined H5_HAVE_FILTER_SHUFFLE && defined H5_HAVE_FILTER_FLETCHER32
puts("Testing shuffle+deflate+checksum filters(checksum first)");
if((dc = H5Pcreate(H5P_DATASET_CREATE))<0) goto error;
if (H5Pset_chunk (dc, 2, chunk_size)<0) goto error;
@@ -2080,7 +2080,7 @@ test_filters(hid_t file)
* STEP 6: Test shuffle + szip + checksum in any order.
*----------------------------------------------------------
*/
-#if defined H5_HAVE_FILTER_SZIP && defined H5_HAVE_FILTER_SHUFFLE && defined H5_HAVE_FILTER_FLETCHER32
+#if defined H5_HAVE_FILTER_SZIP && defined H5_HAVE_FILTER_SHUFFLE && defined H5_HAVE_FILTER_FLETCHER32
TESTING("shuffle+szip+checksum filters(checksum first, with encoder)");
if((dc = H5Pcreate(H5P_DATASET_CREATE))<0) goto error;
@@ -2108,7 +2108,7 @@ test_filters(hid_t file)
/* Clean up objects used for this test */
if (H5Pclose (dc)<0) goto error;
-
+
TESTING("shuffle+szip+checksum filters(checksum last, with encoder)");
/* Make sure encoding is enabled */
@@ -2121,7 +2121,7 @@ test_filters(hid_t file)
if (H5Pset_fletcher32 (dc)<0) goto error;
if(test_filter_internal(file,DSET_SHUF_SZIP_FLET_NAME_2,dc,ENABLE_FLETCHER32,DATA_NOT_CORRUPTED,&combo_size)<0) goto error;
-
+
/* Clean up objects used for this test */
if (H5Pclose (dc)<0) goto error;
@@ -2393,7 +2393,7 @@ error:
* Function: test_onebyte_shuffle
*
* Purpose: Tests the 8-bit array with shuffling algorithm.
- * The shuffled array should be the same result as
+ * The shuffled array should be the same result as
* that before the shuffling.
*
* Return: Success: 0
@@ -2422,7 +2422,7 @@ test_onebyte_shuffle(hid_t file)
#endif /* H5_HAVE_FILTER_SHUFFLE */
TESTING("8-bit shuffling (setup)");
-
+
#ifdef H5_HAVE_FILTER_SHUFFLE
/* Create the data space */
if ((space = H5Screate_simple(2, size, NULL))<0) goto error;
@@ -2433,7 +2433,7 @@ test_onebyte_shuffle(hid_t file)
if (H5Pset_shuffle (dc)<0) goto error;
/* Create the dataset */
- if ((dataset = H5Dcreate(file, DSET_ONEBYTE_SHUF_NAME, H5T_NATIVE_UCHAR,
+ if ((dataset = H5Dcreate(file, DSET_ONEBYTE_SHUF_NAME, H5T_NATIVE_UCHAR,
space,dc))<0) goto error;
for (i= 0;i< 10; i++)
@@ -2449,7 +2449,7 @@ test_onebyte_shuffle(hid_t file)
/*----------------------------------------------------------------------
* STEP 1: Test shuffling by setting up a chunked dataset and writing
* to it.
- *----------------------------------------------------------------------
+ *----------------------------------------------------------------------
*/
TESTING("8-bit shuffling (write)");
@@ -2466,7 +2466,7 @@ test_onebyte_shuffle(hid_t file)
/*----------------------------------------------------------------------
* STEP 2: Try to read the data we just wrote.
- *----------------------------------------------------------------------
+ *----------------------------------------------------------------------
*/
TESTING("8-bit shuffling (read)");
@@ -2491,7 +2491,7 @@ test_onebyte_shuffle(hid_t file)
/*----------------------------------------------------------------------
* Cleanup
- *----------------------------------------------------------------------
+ *----------------------------------------------------------------------
*/
if (H5Pclose (dc)<0) goto error;
if (H5Dclose(dataset)<0) goto error;
@@ -2571,12 +2571,12 @@ test_nbit_int(hid_t file)
/* Initialize data, assuming size of long_long >= size of int */
for (i= 0;i< size[0]; i++)
- for (j = 0; j < size[1]; j++) {
- orig_data[i][j] = ((long_long)HDrandom() %
+ for (j = 0; j < size[1]; j++) {
+ orig_data[i][j] = ((long_long)HDrandom() %
(long_long)HDpow(2.0, precision - 1)) << offset;
/* even-numbered values are negtive */
- if((i*size[1]+j+1)%2 == 0)
+ if((i*size[1]+j+1)%2 == 0)
orig_data[i][j] = -orig_data[i][j];
}
@@ -2615,9 +2615,9 @@ test_nbit_int(hid_t file)
new_data)<0)
goto error;
- /* Check that the values read are the same as the values written
- * Use mask for checking the significant bits, ignoring the padding bits
- */
+ /* Check that the values read are the same as the values written
+ * Use mask for checking the significant bits, ignoring the padding bits
+ */
mask = ~(~0 << (precision + offset)) & (~0 << offset);
for (i=0; i<size[0]; i++) {
for (j=0; j<size[1]; j++) {
@@ -2661,7 +2661,7 @@ error:
* Failure: -1
*
* Programmer: Xiaowen Wu
- * Friday, Jan. 21th, 2005
+ * Friday, Jan. 21th, 2005
*
* Modifications:
*
@@ -2675,9 +2675,9 @@ test_nbit_float(hid_t file)
const hsize_t size[2] = {2, 5};
const hsize_t chunk_size[2] = {2, 5};
/* orig_data[] are initialized to be within the range that can be represented by
- * dataset datatype (no precision loss during datatype conversion)
+ * dataset datatype (no precision loss during datatype conversion)
*/
- float orig_data[2][5] = {{188384.00, 19.103516, -1.0831790e9, -84.242188,
+ float orig_data[2][5] = {{188384.00, 19.103516, -1.0831790e9, -84.242188,
5.2045898}, {-49140.000, 2350.2500, -3.2110596e-1, 6.4998865e-5, -0.0000000}};
float new_data[2][5];
size_t precision, offset;
@@ -2692,10 +2692,10 @@ test_nbit_float(hid_t file)
datatype = H5Tcopy(H5T_IEEE_F32BE);
if(H5Tset_fields(datatype, 26, 20, 6, 7, 13)<0) goto error;
offset = 7;
- if(H5Tset_offset(datatype,offset)<0) goto error;
+ if(H5Tset_offset(datatype,offset)<0) goto error;
precision = 20;
if(H5Tset_precision(datatype,precision)<0) goto error;
- if(H5Tset_size(datatype, 4)<0) goto error;
+ if(H5Tset_size(datatype, 4)<0) goto error;
if(H5Tset_ebias(datatype, 31)<0) goto error;
/* Create the data space */
@@ -2745,7 +2745,7 @@ test_nbit_float(hid_t file)
new_data)<0)
goto error;
- /* Check that the values read are the same as the values written
+ /* Check that the values read are the same as the values written
* Assume size of int = size of float
*/
for (i=0; i<size[0]; i++) {
@@ -2755,7 +2755,7 @@ test_nbit_float(hid_t file)
H5_FAILED();
printf(" Read different values than written.\n");
printf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
- goto error;
+ goto error;
}
}
}
@@ -2808,9 +2808,9 @@ test_nbit_double(hid_t file)
const hsize_t chunk_size[2] = {2, 5};
/* orig_data[] are initialized to be within the range that can be represented by
* dataset datatype (no precision loss during datatype conversion)
- */
+ */
double orig_data[2][5] = {{1.6081706885101836e+60, -255.32099170994480,
- 1.2677579992621376e-61, 64568.289448797700, -1.0619721778839084e-75}, {2.1499497833454840e+56,
+ 1.2677579992621376e-61, 64568.289448797700, -1.0619721778839084e-75}, {2.1499497833454840e+56,
6.6562295504670740e-3, -1.5747263393432150, 1.0711093225222612, -9.8971679387636870e-1}};
double new_data[2][5];
size_t precision, offset;
@@ -2825,10 +2825,10 @@ test_nbit_double(hid_t file)
datatype = H5Tcopy(H5T_IEEE_F64BE);
if(H5Tset_fields(datatype, 55, 46, 9, 5, 41)<0) goto error;
offset = 5;
- if(H5Tset_offset(datatype,offset)<0) goto error;
+ if(H5Tset_offset(datatype,offset)<0) goto error;
precision = 51;
if(H5Tset_precision(datatype,precision)<0) goto error;
- if(H5Tset_size(datatype, 8)<0) goto error;
+ if(H5Tset_size(datatype, 8)<0) goto error;
if(H5Tset_ebias(datatype, 255)<0) goto error;
/* Create the data space */
@@ -2840,7 +2840,7 @@ test_nbit_double(hid_t file)
if (H5Pset_nbit(dc)<0) goto error;
/* Create the dataset */
- if ((dataset = H5Dcreate(file, DSET_NBIT_DOUBLE_NAME, datatype,
+ if ((dataset = H5Dcreate(file, DSET_NBIT_DOUBLE_NAME, datatype,
space, dc))<0) goto error;
PASSED();
@@ -2878,7 +2878,7 @@ test_nbit_double(hid_t file)
new_data)<0)
goto error;
- /* Check that the values read are the same as the values written
+ /* Check that the values read are the same as the values written
* Assume size of long_long = size of double
*/
for (i=0; i<size[0]; i++) {
@@ -2888,7 +2888,7 @@ test_nbit_double(hid_t file)
H5_FAILED();
printf(" Read different values than written.\n");
printf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
- goto error;
+ goto error;
}
}
}
@@ -2938,7 +2938,7 @@ test_nbit_array(hid_t file)
hid_t dataset, base_datatype, array_datatype, space, dc;
hid_t mem_base_datatype, mem_array_datatype;
const hsize_t size[2] = {2, 5};
- const hsize_t adims[2] = {3, 2};
+ const hsize_t adims[2] = {3, 2};
const hsize_t chunk_size[2] = {2,5};
unsigned int orig_data[2][5][3][2];
unsigned int new_data[2][5][3][2];
@@ -2952,7 +2952,7 @@ test_nbit_array(hid_t file)
#ifdef H5_HAVE_FILTER_NBIT
/* Define dataset array datatype's base datatype and set precision, offset */
base_datatype = H5Tcopy(H5T_NATIVE_UINT);
- precision = 22;
+ precision = 22;
if(H5Tset_precision(base_datatype,precision)<0) goto error;
offset = 7;
if(H5Tset_offset(base_datatype,offset)<0) goto error;
@@ -2975,7 +2975,7 @@ test_nbit_array(hid_t file)
/* Use nbit filter */
if((dc = H5Pcreate(H5P_DATASET_CREATE))<0) goto error;
if (H5Pset_chunk(dc, 2, chunk_size)<0) goto error;
- if (H5Pset_nbit(dc)<0) goto error;
+ if (H5Pset_nbit(dc)<0) goto error;
/* Create the dataset */
if ((dataset = H5Dcreate(file, DSET_NBIT_ARRAY_NAME, array_datatype,
@@ -2983,10 +2983,10 @@ test_nbit_array(hid_t file)
/* Initialize data, assuming size of long_long >= size of unsigned int */
for (i= 0;i< size[0]; i++)
- for (j = 0; j < size[1]; j++)
+ for (j = 0; j < size[1]; j++)
for (m = 0; m < adims[0]; m++)
for (n = 0; n < adims[1]; n++)
- orig_data[i][j][m][n] = ((long_long)HDrandom() %
+ orig_data[i][j][m][n] = ((long_long)HDrandom() %
(long_long)HDpow(2.0, precision)) << offset;
PASSED();
#else
@@ -3024,19 +3024,19 @@ test_nbit_array(hid_t file)
new_data)<0)
goto error;
- /* Check that the values read are the same as the values written
+ /* Check that the values read are the same as the values written
*/
- for (i=0; i<size[0]; i++)
- for (j=0; j<size[1]; j++)
+ for (i=0; i<size[0]; i++)
+ for (j=0; j<size[1]; j++)
for (m = 0; m < adims[0]; m++)
- for (n = 0; n < adims[1]; n++) {
+ for (n = 0; n < adims[1]; n++) {
if (new_data[i][j][m][n]!= orig_data[i][j][m][n]) {
H5_FAILED();
printf(" Read different values than written.\n");
printf(" At index %lu,%lu,%lu,%lu\n",
(unsigned long)i, (unsigned long)j, (unsigned long)m, (unsigned long)n);
goto error;
- }
+ }
}
/*----------------------------------------------------------------------
@@ -3138,7 +3138,7 @@ test_nbit_compound(hid_t file)
if(H5Tinsert(mem_cmpd_tid, "c", HOFFSET(atomic, c), c_tid)<0) goto error;
if(H5Tinsert(mem_cmpd_tid, "s", HOFFSET(atomic, s), s_tid)<0) goto error;
if(H5Tinsert(mem_cmpd_tid, "f", HOFFSET(atomic, f), H5T_NATIVE_FLOAT)<0) goto error;
-
+
/* Set order of dataset compound member datatype */
if(H5Tset_order(i_tid, H5T_ORDER_BE)<0) goto error;
if(H5Tset_order(c_tid, H5T_ORDER_BE)<0) goto error;
@@ -3157,7 +3157,7 @@ test_nbit_compound(hid_t file)
/* Use nbit filter */
if((dc = H5Pcreate(H5P_DATASET_CREATE))<0) goto error;
if (H5Pset_chunk(dc, 2, chunk_size)<0) goto error;
- if (H5Pset_nbit(dc)<0) goto error;
+ if (H5Pset_nbit(dc)<0) goto error;
/* Create the dataset */
if ((dataset = H5Dcreate(file, DSET_NBIT_COMPOUND_NAME, cmpd_tid,
@@ -3166,11 +3166,11 @@ test_nbit_compound(hid_t file)
/* Initialize data, assuming size of long_long >= size of member datatypes */
for (i= 0;i< size[0]; i++)
for (j = 0; j < size[1]; j++) {
- orig_data[i][j].i = ((long_long)HDrandom() %
+ orig_data[i][j].i = ((long_long)HDrandom() %
(long_long)HDpow(2.0, precision[0]-1)) << offset[0];
- orig_data[i][j].c = ((long_long)HDrandom() %
+ orig_data[i][j].c = ((long_long)HDrandom() %
(long_long)HDpow(2.0, precision[1]-1)) << offset[1];
- orig_data[i][j].s = ((long_long)HDrandom() %
+ orig_data[i][j].s = ((long_long)HDrandom() %
(long_long)HDpow(2.0, precision[2]-1)) << offset[2];
orig_data[i][j].f = float_val[i][j];
@@ -3216,7 +3216,7 @@ test_nbit_compound(hid_t file)
new_data)<0)
goto error;
- /* Check that the values read are the same as the values written
+ /* Check that the values read are the same as the values written
* Use mask for checking the significant bits, ignoring the padding bits
*/
i_mask = ~(~0 << (precision[0] + offset[0])) & (~0 << offset[0]);
@@ -3224,8 +3224,8 @@ test_nbit_compound(hid_t file)
s_mask = ~(~0 << (precision[2] + offset[2])) & (~0 << offset[2]);
for (i=0; i<size[0]; i++) {
for (j=0; j<size[1]; j++) {
- if ((new_data[i][j].i & i_mask) != (orig_data[i][j].i & i_mask) ||
- (new_data[i][j].c & c_mask) != (orig_data[i][j].c & c_mask) ||
+ if ((new_data[i][j].i & i_mask) != (orig_data[i][j].i & i_mask) ||
+ (new_data[i][j].c & c_mask) != (orig_data[i][j].c & c_mask) ||
(new_data[i][j].s & s_mask) != (orig_data[i][j].s & s_mask) ||
(orig_data[i][j].f==orig_data[i][j].f && new_data[i][j].f != orig_data[i][j].f))
{
@@ -3233,7 +3233,7 @@ test_nbit_compound(hid_t file)
printf(" Read different values than written.\n");
printf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
goto error;
- }
+ }
}
}
@@ -3297,7 +3297,7 @@ test_nbit_compound_2(hid_t file)
atomic d[2][2];
} complex;
- hid_t i_tid, c_tid, s_tid, f_tid, v_tid;
+ hid_t i_tid, c_tid, s_tid, f_tid, v_tid;
hid_t cmpd_tid1; /* atomic compound datatype */
hid_t cmpd_tid2; /* complex compound datatype */
hid_t mem_cmpd_tid1; /* memory atomic compound datatype */
@@ -3375,11 +3375,11 @@ test_nbit_compound_2(hid_t file)
base_tid = H5Tcopy(H5T_NATIVE_CHAR);
if(H5Tset_precision(base_tid,precision[4])<0) goto error;
if(H5Tset_offset(base_tid,offset[4])<0) goto error;
- array_tid = H5Tarray_create(base_tid, 2, array_dims, NULL);
+ array_tid = H5Tarray_create(base_tid, 2, array_dims, NULL);
/* Create the complex memory and dataset array datatype */
- array_cmplx_tid = H5Tarray_create(cmpd_tid1, 2, array_dims, NULL);
- mem_array_cmplx_tid = H5Tarray_create(mem_cmpd_tid1, 2, array_dims, NULL);
+ array_cmplx_tid = H5Tarray_create(cmpd_tid1, 2, array_dims, NULL);
+ mem_array_cmplx_tid = H5Tarray_create(mem_cmpd_tid1, 2, array_dims, NULL);
/* Create a memory complex compound datatype before setting the order */
mem_cmpd_tid2 = H5Tcreate(H5T_COMPOUND, sizeof(complex));
@@ -3387,7 +3387,7 @@ test_nbit_compound_2(hid_t file)
if(H5Tinsert(mem_cmpd_tid2, "v", HOFFSET(complex, v), v_tid)<0) goto error;
if(H5Tinsert(mem_cmpd_tid2, "b", HOFFSET(complex, b), array_tid)<0) goto error;
if(H5Tinsert(mem_cmpd_tid2, "d", HOFFSET(complex, d), mem_array_cmplx_tid)<0) goto error;
-
+
/* Set order of dataset other complex compound member datatype */
if(H5Tset_order(v_tid, H5T_ORDER_BE)<0) goto error;
@@ -3404,7 +3404,7 @@ test_nbit_compound_2(hid_t file)
/* Use nbit filter */
if((dc = H5Pcreate(H5P_DATASET_CREATE))<0) goto error;
if (H5Pset_chunk(dc, 2, chunk_size)<0) goto error;
- if (H5Pset_nbit(dc)<0) goto error;
+ if (H5Pset_nbit(dc)<0) goto error;
/* Create the dataset */
if ((dataset = H5Dcreate(file, DSET_NBIT_COMPOUND_NAME_2, cmpd_tid2,
@@ -3413,15 +3413,15 @@ test_nbit_compound_2(hid_t file)
/* Initialize data, assuming size of long_long >= size of member datatypes */
for (i= 0;i< size[0]; i++)
for (j = 0; j < size[1]; j++) {
- orig_data[i][j].a.i = ((long_long)HDrandom() %
+ orig_data[i][j].a.i = ((long_long)HDrandom() %
(long_long)HDpow(2.0, precision[0]-1)) << offset[0];
- orig_data[i][j].a.c = ((long_long)HDrandom() %
+ orig_data[i][j].a.c = ((long_long)HDrandom() %
(long_long)HDpow(2.0, precision[1]-1)) << offset[1];
- orig_data[i][j].a.s = -((long_long)HDrandom() %
+ orig_data[i][j].a.s = -((long_long)HDrandom() %
(long_long)HDpow(2.0, precision[2]-1)) << offset[2];
orig_data[i][j].a.f = float_val[i][j];
- orig_data[i][j].v = ((long_long)HDrandom() %
+ orig_data[i][j].v = ((long_long)HDrandom() %
(long_long)HDpow(2.0, precision[3])) << offset[3];
for(m = 0; m < array_dims[0]; m++)
@@ -3476,7 +3476,7 @@ test_nbit_compound_2(hid_t file)
new_data)<0)
goto error;
- /* Check that the values read are the same as the values written
+ /* Check that the values read are the same as the values written
* Use mask for checking the significant bits, ignoring the padding bits
*/
i_mask = ~(~0 << (precision[0] + offset[0])) & (~0 << offset[0]);
@@ -3516,10 +3516,10 @@ test_nbit_compound_2(hid_t file)
printf(" Read different values than written.\n");
printf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
goto error;
- }
+ }
}
}
-
+
/*----------------------------------------------------------------------
* Cleanup
*----------------------------------------------------------------------
@@ -3601,7 +3601,7 @@ test_nbit_compound_3(hid_t file)
i_tid=H5Tcopy(H5T_NATIVE_INT);
if(H5Tset_precision(i_tid, 17)<0) goto error;
- str_tid=H5Tcopy(H5T_C_S1);
+ str_tid=H5Tcopy(H5T_C_S1);
if(H5Tset_size(str_tid,30)<0) goto error;
vl_str_tid = H5Tcopy(H5T_C_S1);
@@ -3700,10 +3700,10 @@ test_nbit_compound_3(hid_t file)
printf(" Read different values than written.\n");
printf(" At index %lu\n", (unsigned long)i);
goto error;
- }
+ }
for(k=0; k<i+1; k++)
- if(((unsigned int *)orig_data[i].v.p)[k] !=((unsigned int *)new_data[i].v.p)[k])
+ if(((unsigned int *)orig_data[i].v.p)[k] !=((unsigned int *)new_data[i].v.p)[k])
{
H5_FAILED();
printf(" Read different values than written.\n");
@@ -3712,7 +3712,7 @@ test_nbit_compound_3(hid_t file)
}
for(j=0; j<5; j++)
- if(orig_data[i].o[j] != new_data[i].o[j])
+ if(orig_data[i].o[j] != new_data[i].o[j])
{
H5_FAILED();
printf(" Read different values than written.\n");
@@ -3725,7 +3725,7 @@ test_nbit_compound_3(hid_t file)
* Cleanup
*----------------------------------------------------------------------
*/
- if (H5Dvlen_reclaim(cmpd_tid, space, H5P_DEFAULT, new_data)<0) goto error;
+ if (H5Dvlen_reclaim(cmpd_tid, space, H5P_DEFAULT, new_data)<0) goto error;
if (H5Dvlen_reclaim(cmpd_tid, space, H5P_DEFAULT, orig_data)<0) goto error;
if (H5Tclose(i_tid)<0) goto error;
if (H5Tclose(str_tid)<0) goto error;
@@ -3787,20 +3787,20 @@ test_scaleoffset_int(hid_t file)
datatype = H5Tcopy(H5T_NATIVE_INT);
/* Set order of dataset datatype */
- if(H5Tset_order(datatype, H5T_ORDER_BE)<0) goto error;
+ if(H5Tset_order(datatype, H5T_ORDER_BE)<0) goto error;
/* Create the data space */
if ((space = H5Screate_simple(2, size, NULL))<0) goto error;
/* Create the dataset property list */
if((dc = H5Pcreate(H5P_DATASET_CREATE))<0) goto error;
-
+
/* Fill value undefined */
if (H5Pset_fill_value(dc, datatype, NULL)<0) goto error;
/* Set up to use scaleoffset filter, let library calculate minbits */
if (H5Pset_chunk(dc, 2, chunk_size)<0) goto error;
- if (H5Pset_scaleoffset(dc, H5_SO_INT_MINIMUMBITS_DEFAULT, H5_SO_INT)<0) goto error;
+ if (H5Pset_scaleoffset(dc, H5_SO_INT_MINIMUMBITS_DEFAULT, H5_SO_INT)<0) goto error;
/* Create the dataset */
if ((dataset = H5Dcreate(file, DSET_SCALEOFFSET_INT_NAME, datatype,
@@ -3808,11 +3808,11 @@ test_scaleoffset_int(hid_t file)
/* Initialize data */
for (i= 0;i< size[0]; i++)
- for (j = 0; j < size[1]; j++) {
+ for (j = 0; j < size[1]; j++) {
orig_data[i][j] = HDrandom() % 10000;
/* even-numbered values are negtive */
- if((i*size[1]+j+1)%2 == 0)
+ if((i*size[1]+j+1)%2 == 0)
orig_data[i][j] = -orig_data[i][j];
}
@@ -3856,7 +3856,7 @@ test_scaleoffset_int(hid_t file)
H5_FAILED();
printf(" Read different values than written.\n");
printf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
- goto error;
+ goto error;
}
}
}
@@ -3885,7 +3885,7 @@ error:
* Function: test_scaleoffset_int_2
*
* Purpose: Tests the integer datatype for scaleoffset filter
- * with fill value set
+ * with fill value set
*
* Return: Success: 0
*
@@ -3922,7 +3922,7 @@ test_scaleoffset_int_2(hid_t file)
datatype = H5Tcopy(H5T_NATIVE_INT);
/* Set order of dataset datatype */
- if(H5Tset_order(datatype, H5T_ORDER_BE)<0) goto error;
+ if(H5Tset_order(datatype, H5T_ORDER_BE)<0) goto error;
/* Create the data space for the dataset */
if ((space = H5Screate_simple(2, size, NULL))<0) goto error;
@@ -3945,22 +3945,22 @@ test_scaleoffset_int_2(hid_t file)
/* Create the memory data space */
if ((mspace = H5Screate_simple(2, size, NULL))<0) goto error;
- /* Select hyperslab for data to write, using 1x5 blocks,
+ /* Select hyperslab for data to write, using 1x5 blocks,
* (1,1) stride and (1,1) count starting at the position (0,0).
*/
start[0] = 0; start[1] = 0;
stride[0] = 1; stride[1] = 1;
- count[0] = 1; count[1] = 1;
+ count[0] = 1; count[1] = 1;
block[0] = 1; block[1] = 5;
- if(H5Sselect_hyperslab(mspace, H5S_SELECT_SET, start,
+ if(H5Sselect_hyperslab(mspace, H5S_SELECT_SET, start,
stride, count, block)<0) goto error;
/* Initialize data of hyperslab */
- for (j = 0; j < size[1]; j++) {
+ for (j = 0; j < size[1]; j++) {
orig_data[0][j] = (long_long)HDrandom() % 10000;
- /* even-numbered values are negtive */
- if((j+1)%2 == 0)
+ /* even-numbered values are negtive */
+ if((j+1)%2 == 0)
orig_data[0][j] = -orig_data[0][j];
}
@@ -3995,7 +3995,7 @@ test_scaleoffset_int_2(hid_t file)
#ifdef H5_HAVE_FILTER_SCALEOFFSET
/* Read the dataset back */
- if (H5Dread(dataset, H5T_NATIVE_INT, mspace, mspace, H5P_DEFAULT,
+ if (H5Dread(dataset, H5T_NATIVE_INT, mspace, mspace, H5P_DEFAULT,
new_data)<0) goto error;
/* Check that the values read are the same as the values written */
@@ -4064,7 +4064,7 @@ test_scaleoffset_float(hid_t file)
datatype = H5Tcopy(H5T_NATIVE_FLOAT);
/* Set order of dataset datatype */
- if(H5Tset_order(datatype, H5T_ORDER_BE)<0) goto error;
+ if(H5Tset_order(datatype, H5T_ORDER_BE)<0) goto error;
/* Create the data space */
if ((space = H5Screate_simple(2, size, NULL))<0) goto error;
@@ -4075,11 +4075,11 @@ test_scaleoffset_float(hid_t file)
/* Fill value undefined */
if (H5Pset_fill_value(dc, datatype, NULL)<0) goto error;
- /* Set up to use scaleoffset filter, decimal scale factor is 3,
- * use variable-minimum-bits method
+ /* Set up to use scaleoffset filter, decimal scale factor is 3,
+ * use variable-minimum-bits method
*/
if (H5Pset_chunk(dc, 2, chunk_size)<0) goto error;
- if (H5Pset_scaleoffset(dc, 3, H5_SO_FLOAT_DSCALE)<0) goto error;
+ if (H5Pset_scaleoffset(dc, 3, H5_SO_FLOAT_DSCALE)<0) goto error;
/* Create the dataset */
if ((dataset = H5Dcreate(file, DSET_SCALEOFFSET_FLOAT_NAME, datatype,
@@ -4087,11 +4087,11 @@ test_scaleoffset_float(hid_t file)
/* Initialize data */
for (i= 0;i< size[0]; i++)
- for (j = 0; j < size[1]; j++) {
+ for (j = 0; j < size[1]; j++) {
orig_data[i][j] = (HDrandom() % 100000) / 1000.0;
/* even-numbered values are negtive */
- if((i*size[1]+j+1)%2 == 0)
+ if((i*size[1]+j+1)%2 == 0)
orig_data[i][j] = -orig_data[i][j];
}
@@ -4201,7 +4201,7 @@ test_scaleoffset_float_2(hid_t file)
datatype = H5Tcopy(H5T_NATIVE_FLOAT);
/* Set order of dataset datatype */
- if(H5Tset_order(datatype, H5T_ORDER_BE)<0) goto error;
+ if(H5Tset_order(datatype, H5T_ORDER_BE)<0) goto error;
/* Create the data space for the dataset */
if ((space = H5Screate_simple(2, size, NULL))<0) goto error;
@@ -4213,8 +4213,8 @@ test_scaleoffset_float_2(hid_t file)
fillval = 10000.0;
if (H5Pset_fill_value(dc, H5T_NATIVE_FLOAT, &fillval)<0) goto error;
- /* Set up to use scaleoffset filter, decimal scale factor is 3,
- * use variable-minimum-bits method
+ /* Set up to use scaleoffset filter, decimal scale factor is 3,
+ * use variable-minimum-bits method
*/
if (H5Pset_chunk(dc, 2, chunk_size)<0) goto error;
if (H5Pset_scaleoffset(dc, 3, H5_SO_FLOAT_DSCALE)<0) goto error;
@@ -4226,22 +4226,22 @@ test_scaleoffset_float_2(hid_t file)
/* Create the memory data space */
if ((mspace = H5Screate_simple(2, size, NULL))<0) goto error;
- /* Select hyperslab for data to write, using 1x5 blocks,
+ /* Select hyperslab for data to write, using 1x5 blocks,
* (1,1) stride and (1,1) count starting at the position (0,0).
*/
start[0] = 0; start[1] = 0;
stride[0] = 1; stride[1] = 1;
- count[0] = 1; count[1] = 1;
+ count[0] = 1; count[1] = 1;
block[0] = 1; block[1] = 5;
- if(H5Sselect_hyperslab(mspace, H5S_SELECT_SET, start,
+ if(H5Sselect_hyperslab(mspace, H5S_SELECT_SET, start,
stride, count, block)<0) goto error;
/* Initialize data of hyperslab */
- for (j = 0; j < size[1]; j++) {
+ for (j = 0; j < size[1]; j++) {
orig_data[0][j] = (HDrandom() % 100000) / 1000.0;
- /* even-numbered values are negtive */
- if((j+1)%2 == 0)
+ /* even-numbered values are negtive */
+ if((j+1)%2 == 0)
orig_data[0][j] = -orig_data[0][j];
}
@@ -4276,7 +4276,7 @@ test_scaleoffset_float_2(hid_t file)
#ifdef H5_HAVE_FILTER_SCALEOFFSET
/* Read the dataset back */
- if (H5Dread(dataset, H5T_NATIVE_FLOAT, mspace, mspace, H5P_DEFAULT,
+ if (H5Dread(dataset, H5T_NATIVE_FLOAT, mspace, mspace, H5P_DEFAULT,
new_data)<0) goto error;
/* Check that the values read are the same as the values written */
@@ -4285,7 +4285,7 @@ test_scaleoffset_float_2(hid_t file)
H5_FAILED();
printf(" Read different values than written.\n");
printf(" At index %lu,%lu\n", (unsigned long)0, (unsigned long)j);
- goto error;
+ goto error;
}
}
/*----------------------------------------------------------------------
@@ -4344,7 +4344,7 @@ test_scaleoffset_double(hid_t file)
datatype = H5Tcopy(H5T_NATIVE_DOUBLE);
/* Set order of dataset datatype */
- if(H5Tset_order(datatype, H5T_ORDER_BE)<0) goto error;
+ if(H5Tset_order(datatype, H5T_ORDER_BE)<0) goto error;
/* Create the data space */
if ((space = H5Screate_simple(2, size, NULL))<0) goto error;
@@ -4355,11 +4355,11 @@ test_scaleoffset_double(hid_t file)
/* Fill value undefined */
if (H5Pset_fill_value(dc, datatype, NULL)<0) goto error;
- /* Set up to use scaleoffset filter, decimal scale factor is 7,
- * use variable-minimum-bits method
+ /* Set up to use scaleoffset filter, decimal scale factor is 7,
+ * use variable-minimum-bits method
*/
if (H5Pset_chunk(dc, 2, chunk_size)<0) goto error;
- if (H5Pset_scaleoffset(dc, 7, H5_SO_FLOAT_DSCALE)<0) goto error;
+ if (H5Pset_scaleoffset(dc, 7, H5_SO_FLOAT_DSCALE)<0) goto error;
/* Create the dataset */
if ((dataset = H5Dcreate(file, DSET_SCALEOFFSET_DOUBLE_NAME, datatype,
@@ -4367,11 +4367,11 @@ test_scaleoffset_double(hid_t file)
/* Initialize data */
for (i= 0;i< size[0]; i++)
- for (j = 0; j < size[1]; j++) {
+ for (j = 0; j < size[1]; j++) {
orig_data[i][j] = (HDrandom() % 10000000) / 10000000.0;
/* even-numbered values are negtive */
- if((i*size[1]+j+1)%2 == 0)
+ if((i*size[1]+j+1)%2 == 0)
orig_data[i][j] = -orig_data[i][j];
}
@@ -4481,7 +4481,7 @@ test_scaleoffset_double_2(hid_t file)
datatype = H5Tcopy(H5T_NATIVE_DOUBLE);
/* Set order of dataset datatype */
- if(H5Tset_order(datatype, H5T_ORDER_BE)<0) goto error;
+ if(H5Tset_order(datatype, H5T_ORDER_BE)<0) goto error;
/* Create the data space for the dataset */
if ((space = H5Screate_simple(2, size, NULL))<0) goto error;
@@ -4493,8 +4493,8 @@ test_scaleoffset_double_2(hid_t file)
fillval = 10000.0;
if (H5Pset_fill_value(dc, H5T_NATIVE_DOUBLE, &fillval)<0) goto error;
- /* Set up to use scaleoffset filter, decimal scale factor is 7,
- * use variable-minimum-bits method
+ /* Set up to use scaleoffset filter, decimal scale factor is 7,
+ * use variable-minimum-bits method
*/
if (H5Pset_chunk(dc, 2, chunk_size)<0) goto error;
if (H5Pset_scaleoffset(dc, 7, H5_SO_FLOAT_DSCALE)<0) goto error;
@@ -4506,22 +4506,22 @@ test_scaleoffset_double_2(hid_t file)
/* Create the memory data space */
if ((mspace = H5Screate_simple(2, size, NULL))<0) goto error;
- /* Select hyperslab for data to write, using 1x5 blocks,
+ /* Select hyperslab for data to write, using 1x5 blocks,
* (1,1) stride and (1,1) count starting at the position (0,0).
*/
start[0] = 0; start[1] = 0;
stride[0] = 1; stride[1] = 1;
- count[0] = 1; count[1] = 1;
+ count[0] = 1; count[1] = 1;
block[0] = 1; block[1] = 5;
- if(H5Sselect_hyperslab(mspace, H5S_SELECT_SET, start,
+ if(H5Sselect_hyperslab(mspace, H5S_SELECT_SET, start,
stride, count, block)<0) goto error;
/* Initialize data of hyperslab */
- for (j = 0; j < size[1]; j++) {
+ for (j = 0; j < size[1]; j++) {
orig_data[0][j] = (HDrandom() % 10000000) / 10000000.0;
- /* even-numbered values are negtive */
- if((j+1)%2 == 0)
+ /* even-numbered values are negtive */
+ if((j+1)%2 == 0)
orig_data[0][j] = -orig_data[0][j];
}
@@ -4556,7 +4556,7 @@ test_scaleoffset_double_2(hid_t file)
#ifdef H5_HAVE_FILTER_SCALEOFFSET
/* Read the dataset back */
- if (H5Dread(dataset, H5T_NATIVE_DOUBLE, mspace, mspace, H5P_DEFAULT,
+ if (H5Dread(dataset, H5T_NATIVE_DOUBLE, mspace, mspace, H5P_DEFAULT,
new_data)<0) goto error;
/* Check that the values read are the same as the values written */
@@ -4565,7 +4565,7 @@ test_scaleoffset_double_2(hid_t file)
H5_FAILED();
printf(" Read different values than written.\n");
printf(" At index %lu,%lu\n", (unsigned long)0, (unsigned long)j);
- goto error;
+ goto error;
}
}
@@ -4640,14 +4640,14 @@ test_multiopen (hid_t file)
(int)tmp_size[0], (int)cur_size[0]);
goto error;
}
-
+
if (H5Dclose (dset1)<0) goto error;
if (H5Dclose (dset2)<0) goto error;
if (H5Sclose (space)<0) goto error;
if (H5Pclose (dcpl)<0) goto error;
PASSED();
return 0;
-
+
error:
H5E_BEGIN_TRY {
H5Dclose (dset1);
@@ -4726,7 +4726,7 @@ test_types(hid_t file)
if (H5Sclose(space)<0) goto error;
if (H5Tclose(type)<0) goto error;
if (H5Dclose(dset)<0) goto error;
-
+
/* opaque_2 */
nelmts = sizeof(buf)/4;
if ((type=H5Tcreate(H5T_OPAQUE, 4))<0 ||
@@ -4740,12 +4740,12 @@ test_types(hid_t file)
if (H5Sclose(space)<0) goto error;
if (H5Tclose(type)<0) goto error;
if (H5Dclose(dset)<0) goto error;
-
+
/* Cleanup */
if (H5Gclose(grp)<0) goto error;
PASSED();
return 0;
-
+
error:
H5E_BEGIN_TRY {
H5Gclose(grp);
@@ -5159,7 +5159,7 @@ test_set_local(hid_t fapl)
TESTING("dataset filter 'set local' callback");
h5_fixname(FILENAME[5], fapl, filename, sizeof filename);
-
+
/* Initialize the integer & floating-point dataset */
n=0.0;
for (i = 0; i < DSET_DIM1; i++)
@@ -5174,7 +5174,7 @@ test_set_local(hid_t fapl)
printf(" Line %d: Can't open file\n",__LINE__);
goto error;
}
-
+
/* Create dcpl with special filter */
if((dcpl = H5Pcreate(H5P_DATASET_CREATE))<0) {
H5_FAILED();
@@ -5274,7 +5274,7 @@ test_set_local(hid_t fapl)
printf(" Line %d: Can't open file\n",__LINE__);
goto error;
}
-
+
/* Re-open dataset */
if ((dsid = H5Dopen(file, DSET_SET_LOCAL_NAME))<0) {
H5_FAILED();
@@ -5488,7 +5488,7 @@ error:
* Monday, January 26, 2004
*
* Modifications:
- *
+ *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -5496,7 +5496,7 @@ test_filter_delete(hid_t file)
{
H5Z_filter_t filtn; /* filter identification number */
hid_t dsid=-1; /* dataset ID */
- hid_t sid=-1; /* dataspace ID */
+ hid_t sid=-1; /* dataspace ID */
hid_t dcpl=-1; /* dataset creation property list ID */
hid_t dcpl1=-1; /* dataset creation property list ID */
hsize_t dims[2]={20,20}; /* dataspace dimensions */
@@ -5507,7 +5507,7 @@ test_filter_delete(hid_t file)
TESTING("filter deletion");
-#if defined H5_HAVE_FILTER_DEFLATE && defined H5_HAVE_FILTER_SHUFFLE && defined H5_HAVE_FILTER_FLETCHER32
+#if defined H5_HAVE_FILTER_DEFLATE && defined H5_HAVE_FILTER_SHUFFLE && defined H5_HAVE_FILTER_FLETCHER32
/* create the data space */
if ((sid = H5Screate_simple(2, dims, NULL))<0) goto error;
@@ -5527,13 +5527,13 @@ test_filter_delete(hid_t file)
/*----------------------------------------------------------------------
* delete the deflate filter
- *----------------------------------------------------------------------
+ *----------------------------------------------------------------------
*/
/* delete the deflate filter */
if (H5Premove_filter(dcpl1,H5Z_FILTER_DEFLATE)<0) goto error;
/* get information about filters */
- if ((nfilters = H5Pget_nfilters(dcpl1))<0) goto error;
+ if ((nfilters = H5Pget_nfilters(dcpl1))<0) goto error;
/* check if filter was deleted */
for (i=0; i<nfilters; i++) {
@@ -5543,8 +5543,8 @@ test_filter_delete(hid_t file)
filtn = H5Pget_filter(dcpl1,(unsigned)i,0,0,0,0,0,NULL);
#endif
if (H5Z_FILTER_DEFLATE==filtn)
- goto error;
- }
+ goto error;
+ }
/* try to delete the deflate filter again */
H5E_BEGIN_TRY {
@@ -5558,20 +5558,20 @@ test_filter_delete(hid_t file)
/*----------------------------------------------------------------------
* delete all filters
- *----------------------------------------------------------------------
+ *----------------------------------------------------------------------
*/
/* delete all filters */
- if (H5Premove_filter(dcpl1,H5Z_FILTER_ALL)<0) goto error;
+ if (H5Premove_filter(dcpl1,H5Z_FILTER_ALL)<0) goto error;
/* get information about filters */
- if ((nfilters = H5Pget_nfilters(dcpl1))<0) goto error;
+ if ((nfilters = H5Pget_nfilters(dcpl1))<0) goto error;
/* check if filters were deleted */
- if (nfilters)goto error;
+ if (nfilters)goto error;
/*----------------------------------------------------------------------
* close
- *----------------------------------------------------------------------
+ *----------------------------------------------------------------------
*/
/* clean up objects used for this test */
@@ -5610,16 +5610,16 @@ error:
* Monday, March 8, 2004
*
* Modifications:
- *
+ *
*-------------------------------------------------------------------------
*/
static herr_t
auxread_fdata(hid_t fid, const char *name)
{
- hid_t dset_id=-1; /* dataset ID */
- hid_t dcpl_id=-1; /* dataset creation property list ID */
- hid_t space_id=-1; /* space ID */
- hid_t ftype_id=-1; /* file data type ID */
+ hid_t dset_id=-1; /* dataset ID */
+ hid_t dcpl_id=-1; /* dataset creation property list ID */
+ hid_t space_id=-1; /* space ID */
+ hid_t ftype_id=-1; /* file data type ID */
hid_t mtype_id=-1; /* memory data type ID */
size_t msize; /* memory size of memory type */
void *buf=NULL; /* data buffer */
@@ -5627,14 +5627,14 @@ auxread_fdata(hid_t fid, const char *name)
int rank; /* rank of dataset */
hsize_t dims[H5S_MAX_RANK];/* dimensions of dataset */
int i;
-
- if ((dset_id=H5Dopen(fid,name))<0)
+
+ if ((dset_id=H5Dopen(fid,name))<0)
goto error;
- if ((space_id=H5Dget_space(dset_id))<0)
+ if ((space_id=H5Dget_space(dset_id))<0)
goto error;
- if ((ftype_id=H5Dget_type (dset_id))<0)
+ if ((ftype_id=H5Dget_type (dset_id))<0)
goto error;
- if ((dcpl_id=H5Dget_create_plist(dset_id))<0)
+ if ((dcpl_id=H5Dget_create_plist(dset_id))<0)
goto error;
if ( (rank=H5Sget_simple_extent_ndims(space_id))<0)
goto error;
@@ -5642,13 +5642,13 @@ auxread_fdata(hid_t fid, const char *name)
if ( H5Sget_simple_extent_dims(space_id,dims,NULL)<0)
goto error;
nelmts=1;
- for (i=0; i<rank; i++)
+ for (i=0; i<rank; i++)
nelmts*=dims[i];
if ((mtype_id=H5Tget_native_type(ftype_id,H5T_DIR_DEFAULT))<0)
goto error;
if ((msize=H5Tget_size(mtype_id))==0)
goto error;
-
+
if (nelmts)
{
buf=(void *) HDmalloc((unsigned)(nelmts*msize));
@@ -5659,12 +5659,12 @@ auxread_fdata(hid_t fid, const char *name)
if (H5Dread(dset_id,mtype_id,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf)<0)
goto error;
}
-
- if (H5Pclose(dcpl_id)<0)
+
+ if (H5Pclose(dcpl_id)<0)
goto error;
- if (H5Sclose(space_id)<0)
+ if (H5Sclose(space_id)<0)
goto error;
- if (H5Dclose(dset_id)<0)
+ if (H5Dclose(dset_id)<0)
goto error;
if (buf)
free(buf);
@@ -5697,7 +5697,7 @@ error:
* Monday, March 8, 2004
*
* Modifications:
- *
+ *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -5705,7 +5705,7 @@ test_filters_endianess(void)
{
hid_t fid=-1; /* file ID */
hid_t dsid=-1; /* dataset ID */
- hid_t sid=-1; /* dataspace ID */
+ hid_t sid=-1; /* dataspace ID */
hid_t dcpl=-1; /* dataset creation property list ID */
hsize_t dims[1]={2}; /* dataspace dimensions */
hsize_t chunk_dims[1]={2}; /* chunk dimensions */
@@ -5714,18 +5714,18 @@ test_filters_endianess(void)
int i;
char *srcdir = getenv("srcdir"); /* the source directory */
char data_file[512]=""; /* buffer to hold name of existing file */
-
+
for (i=0; i<2; i++){
buf[i]=1;
}
-
+
TESTING("filters with big-endian/little-endian data");
-#if defined H5_HAVE_FILTER_FLETCHER32
+#if defined H5_HAVE_FILTER_FLETCHER32
/*-------------------------------------------------------------------------
- * step1: create a file
+ * step1: create a file
*-------------------------------------------------------------------------
- */
+ */
/* create a file using default properties */
fid=H5Fcreate("test_filters.h5",H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT);
@@ -5751,9 +5751,9 @@ test_filters_endianess(void)
if (H5Fclose (fid)<0) goto error;
/*-------------------------------------------------------------------------
- * step 2: open a file written on a little-endian machine in step 1
+ * step 2: open a file written on a little-endian machine in step 1
*-------------------------------------------------------------------------
- */
+ */
/* compose the name of the file to open, using the srcdir, if appropriate */
strcpy(data_file, "");
@@ -5761,11 +5761,11 @@ test_filters_endianess(void)
{
strcpy(data_file, srcdir);
strcat(data_file, "/");
- }
+ }
strcat( data_file, "test_filters_le.hdf5");
/* open */
- if ((fid=H5Fopen(data_file,H5F_ACC_RDONLY,H5P_DEFAULT))<0)
+ if ((fid=H5Fopen(data_file,H5F_ACC_RDONLY,H5P_DEFAULT))<0)
goto error;
/* read */
@@ -5775,9 +5775,9 @@ test_filters_endianess(void)
if (H5Fclose(fid)<0) goto error;
/*-------------------------------------------------------------------------
- * step 3: open a file written on a big-endian machine in step 1
+ * step 3: open a file written on a big-endian machine in step 1
*-------------------------------------------------------------------------
- */
+ */
/* compose the name of the file to open, using the srcdir, if appropriate */
strcpy(data_file, "");
@@ -5785,11 +5785,11 @@ test_filters_endianess(void)
{
strcpy(data_file, srcdir);
strcat(data_file, "/");
- }
+ }
strcat( data_file, "test_filters_be.hdf5");
/* open */
- if ((fid=H5Fopen(data_file,H5F_ACC_RDONLY,H5P_DEFAULT))<0)
+ if ((fid=H5Fopen(data_file,H5F_ACC_RDONLY,H5P_DEFAULT))<0)
goto error;
/* read */
@@ -5797,7 +5797,7 @@ test_filters_endianess(void)
/* close */
if (H5Fclose(fid)<0) goto error;
-
+
PASSED();
#else
SKIPPED();
@@ -5827,7 +5827,7 @@ error:
* Tuesday, July 27, 2004
*
* Modifications:
- *
+ *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -5835,7 +5835,7 @@ test_zero_dims(hid_t file)
{
hid_t s=-1, d=-1, dcpl=-1;
hsize_t dsize=0, dmax=H5S_UNLIMITED, csize=5;
-
+
TESTING("I/O on datasets with zero-sized dims");
if((s = H5Screate_simple(1, &dsize, &dmax))<0) TEST_ERROR;
@@ -5848,7 +5848,7 @@ test_zero_dims(hid_t file)
if(H5Pclose(dcpl)<0) TEST_ERROR;
if(H5Sclose(s)<0) TEST_ERROR;
if(H5Dclose(d)<0) TEST_ERROR;
-
+
PASSED();
return 0;
@@ -5876,7 +5876,7 @@ error:
* Tuesday, August 25, 2004
*
* Modifications:
- *
+ *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -5891,7 +5891,7 @@ test_missing_chunk(hid_t file)
rdata[MISSING_CHUNK_DIM];
hsize_t dsize=100, dmax=H5S_UNLIMITED, csize=5;
size_t u;
-
+
TESTING("Read dataset with unwritten chunk & undefined fill value");
/* Initialize data */
@@ -5949,7 +5949,7 @@ test_missing_chunk(hid_t file)
if(H5Pclose(dcpl)<0) TEST_ERROR;
if(H5Sclose(s)<0) TEST_ERROR;
if(H5Dclose(d)<0) TEST_ERROR;
-
+
PASSED();
return 0;
@@ -5992,7 +5992,7 @@ main(void)
h5_reset();
fapl = h5_fileaccess();
-
+
/* Set the random # seed */
HDsrandom((unsigned long)HDtime(NULL));
@@ -6006,7 +6006,7 @@ main(void)
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) {
goto error;
}
-
+
/* Cause the library to emit initial messages */
if ((grp = H5Gcreate (file, "emit diagnostics", 0))<0) goto error;
if (H5Gset_comment(grp, ".", "Causes diagnostic messages to be emitted")<0)
@@ -6017,31 +6017,31 @@ main(void)
nerrors += test_simple_io(fapl)<0 ?1:0;
nerrors += test_compact_io(fapl)<0 ?1:0;
nerrors += test_max_compact(fapl)<0 ?1:0;
- nerrors += test_conv_buffer(file)<0 ?1:0;
- nerrors += test_tconv(file)<0 ?1:0;
+ nerrors += test_conv_buffer(file)<0 ?1:0;
+ nerrors += test_tconv(file)<0 ?1:0;
nerrors += test_filters(file)<0 ?1:0;
nerrors += test_onebyte_shuffle(file)<0 ?1:0;
nerrors += test_nbit_int(file)<0 ?1:0;
- nerrors += test_nbit_float(file)<0 ?1:0;
- nerrors += test_nbit_double(file)<0 ?1:0;
+ nerrors += test_nbit_float(file)<0 ?1:0;
+ nerrors += test_nbit_double(file)<0 ?1:0;
nerrors += test_nbit_array(file)<0 ?1:0;
- nerrors += test_nbit_compound(file)<0 ?1:0;
+ nerrors += test_nbit_compound(file)<0 ?1:0;
nerrors += test_nbit_compound_2(file)<0 ?1:0;
nerrors += test_nbit_compound_3(file)<0 ?1:0;
- nerrors += test_scaleoffset_int(file)<0 ?1:0;
- nerrors += test_scaleoffset_int_2(file)<0 ?1:0;
- nerrors += test_scaleoffset_float(file)<0 ?1:0;
- nerrors += test_scaleoffset_float_2(file)<0 ?1:0;
- nerrors += test_scaleoffset_double(file)<0 ?1:0;
- nerrors += test_scaleoffset_double_2(file)<0 ?1:0;
+ nerrors += test_scaleoffset_int(file)<0 ?1:0;
+ nerrors += test_scaleoffset_int_2(file)<0 ?1:0;
+ nerrors += test_scaleoffset_float(file)<0 ?1:0;
+ nerrors += test_scaleoffset_float_2(file)<0 ?1:0;
+ nerrors += test_scaleoffset_double(file)<0 ?1:0;
+ nerrors += test_scaleoffset_double_2(file)<0 ?1:0;
nerrors += test_multiopen (file)<0 ?1:0;
nerrors += test_types(file)<0 ?1:0;
nerrors += test_userblock_offset(fapl)<0 ?1:0;
nerrors += test_missing_filter(file)<0 ?1:0;
- nerrors += test_can_apply(file)<0 ?1:0;
+ nerrors += test_can_apply(file)<0 ?1:0;
nerrors += test_set_local(fapl)<0 ?1:0;
- nerrors += test_can_apply_szip(file)<0 ?1:0;
- nerrors += test_compare_dcpl(file)<0 ?1:0;
+ nerrors += test_can_apply_szip(file)<0 ?1:0;
+ nerrors += test_compare_dcpl(file)<0 ?1:0;
nerrors += test_filter_delete(file)<0 ?1:0;
nerrors += test_filters_endianess()<0 ?1:0;
nerrors += test_zero_dims(file)<0 ?1:0;
@@ -6051,7 +6051,7 @@ main(void)
if (nerrors) goto error;
printf("All dataset tests passed.\n");
- h5_cleanup(FILENAME, fapl);
+ h5_cleanup(FILENAME, fapl);
return 0;
error:
diff --git a/test/dt_arith.c b/test/dt_arith.c
index 134f96b..6c481e6 100644
--- a/test/dt_arith.c
+++ b/test/dt_arith.c
@@ -65,9 +65,9 @@ const char *FILENAME[] = {
typedef enum dtype_t {
INT_SCHAR, INT_UCHAR, INT_SHORT, INT_USHORT, INT_INT, INT_UINT,
- INT_LONG, INT_ULONG, INT_LLONG, INT_ULLONG, FLT_FLOAT, FLT_DOUBLE,
+ INT_LONG, INT_ULONG, INT_LLONG, INT_ULLONG, FLT_FLOAT, FLT_DOUBLE,
#if H5_SIZEOF_LONG_DOUBLE !=0
- FLT_LDOUBLE,
+ FLT_LDOUBLE,
#endif
OTHER
} dtype_t;
@@ -156,9 +156,9 @@ static int without_hardware_g = 0;
} \
}
-/* Change a buffer's byte order from big endian to little endian. It's mainly for library's
+/* Change a buffer's byte order from big endian to little endian. It's mainly for library's
* bit operations which handle only little endian order.
- */
+ */
#define CHANGE_ORDER(EBUF, EORDER, ESIZE) \
{ \
if (H5T_ORDER_BE==EORDER) { \
@@ -173,7 +173,7 @@ static int without_hardware_g = 0;
} \
}
-/* Allocate buffer and initialize it with floating-point normalized values.
+/* Allocate buffer and initialize it with floating-point normalized values.
* It's for conversion test of floating-point as the source.
*/
#define INIT_FP_NORM(TYPE, SRC_MAX, SRC_MIN, SRC_MAX_10_EXP, SRC_MIN_10_EXP, SRC_SIZE, \
@@ -251,7 +251,7 @@ static int without_hardware_g = 0;
saved_p += SRC_SIZE; \
}
-/* Allocate buffer and initialize it with floating-point denormalized values.
+/* Allocate buffer and initialize it with floating-point denormalized values.
* It's for conversion test of floating-point as the source.
*/
#define INIT_FP_DENORM(TYPE, SRC_MANT_DIG, SRC_SIZE, SRC_PREC, SRC_ORDR, DST_SIZE, \
@@ -304,7 +304,7 @@ static int without_hardware_g = 0;
free(tmp2); \
}
-/* Allocate buffer and initialize it with floating-point special values, +/-0, +/-infinity,
+/* Allocate buffer and initialize it with floating-point special values, +/-0, +/-infinity,
* +/-QNaN, +/-SNaN. It's for conversion test of floating-point as the source.
*/
#define INIT_FP_SPECIAL(SRC_SIZE, SRC_PREC, SRC_ORDR, SRC_MANT_DIG, DST_SIZE, \
@@ -372,7 +372,7 @@ static int without_hardware_g = 0;
void some_dummy_func(float x);
static hbool_t overflows(unsigned char *origin_bits, hid_t src_id, size_t dst_num_bits);
static int my_isnan(dtype_t type, void *val);
-static int my_isinf(dtype_t type, int endian, unsigned char *val, size_t size,
+static int my_isinf(dtype_t type, int endian, unsigned char *val, size_t size,
size_t mpos, size_t msize, size_t epos, size_t esize);
/*-------------------------------------------------------------------------
@@ -462,23 +462,23 @@ reset_hdf5(void)
*
*-------------------------------------------------------------------------
*/
-static H5T_conv_ret_t
+static H5T_conv_ret_t
except_func(int except_type, hid_t UNUSED src_id, hid_t UNUSED dst_id, void UNUSED *src_buf,
void *dst_buf, void *user_data)
{
H5T_conv_ret_t ret = H5T_CONV_HANDLED;
- if(except_type == H5T_CONV_EXCEPT_RANGE_HI)
+ if(except_type == H5T_CONV_EXCEPT_RANGE_HI)
/*only test integer case*/
*(int*)dst_buf = *(int*)user_data;
else if(except_type == H5T_CONV_EXCEPT_RANGE_LOW)
/*only test integer case*/
*(int*)dst_buf = *(int*)user_data;
else if(except_type == H5T_CONV_EXCEPT_TRUNCATE)
- ret = H5T_CONV_UNHANDLED;
+ ret = H5T_CONV_UNHANDLED;
else if(except_type == H5T_CONV_EXCEPT_PRECISION)
- ret = H5T_CONV_UNHANDLED;
- else if(except_type == H5T_CONV_EXCEPT_PINF)
+ ret = H5T_CONV_UNHANDLED;
+ else if(except_type == H5T_CONV_EXCEPT_PINF)
/*only test integer case*/
*(int*)dst_buf = *(int*)user_data;
else if(except_type == H5T_CONV_EXCEPT_NINF)
@@ -557,7 +557,7 @@ generates_sigfpe(void)
}
HDexit(0);
}
-
+
while (pid!=waitpid(pid, &status, 0))
/*void*/;
if (WIFEXITED(status) && 0==WEXITSTATUS(status)) {
@@ -584,17 +584,17 @@ generates_sigfpe(void)
* Purpose: Tests user-define and query functions of floating-point types.
*
* Return: Success: 0
- *
+ *
* Failure: number of errors
*
* Programmer: Raymond Lu
* Thursday, Jan 6, 2005
- *
+ *
* Modifications:
*
*-------------------------------------------------------------------------
*/
-static int
+static int
test_derived_flt(void)
{
hid_t file=-1, tid1=-1, tid2=-1;
@@ -618,50 +618,50 @@ test_derived_flt(void)
if((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT))<0) {
H5_FAILED();
printf("Can't create file\n");
- goto error;
+ goto error;
}
if((dxpl_id = H5Pcreate(H5P_DATASET_XFER))<0) {
H5_FAILED();
printf("Can't create data transfer property list\n");
- goto error;
+ goto error;
}
if((tid1 = H5Tcopy(H5T_IEEE_F64LE))<0) {
H5_FAILED();
printf("Can't copy data type\n");
- goto error;
+ goto error;
}
if((tid2 = H5Tcopy(H5T_IEEE_F32LE))<0) {
H5_FAILED();
printf("Can't copy data type\n");
- goto error;
+ goto error;
}
/*------------------------------------------------------------------------
* 1st floating-point type
- * size=7 byte, precision=42 bits, offset=3 bits, mantissa size=31 bits,
- * mantissa position=3, exponent size=10 bits, exponent position=34,
- * exponent bias=511. It can be illustrated in little-endian order as
+ * size=7 byte, precision=42 bits, offset=3 bits, mantissa size=31 bits,
+ * mantissa position=3, exponent size=10 bits, exponent position=34,
+ * exponent bias=511. It can be illustrated in little-endian order as
*
* 6 5 4 3 2 1 0
* ???????? ???SEEEE EEEEEEMM MMMMMMMM MMMMMMMM MMMMMMMM MMMMM???
*
- * To create a new floating-point type, the following properties must be
- * set in the order of
- * set fields -> set offset -> set precision -> set size.
- * All these properties must be set before the type can function. Other
- * properties can be set anytime. Derived type size cannot be expanded
- * bigger than original size but can be decreased. There should be no
- * holes among the significant bits. Exponent bias usually is set
+ * To create a new floating-point type, the following properties must be
+ * set in the order of
+ * set fields -> set offset -> set precision -> set size.
+ * All these properties must be set before the type can function. Other
+ * properties can be set anytime. Derived type size cannot be expanded
+ * bigger than original size but can be decreased. There should be no
+ * holes among the significant bits. Exponent bias usually is set
* 2^(n-1)-1, where n is the exponent size.
- *-----------------------------------------------------------------------*/
+ *-----------------------------------------------------------------------*/
if(H5Tset_fields(tid1, 44, 34, 10, 3, 31)<0) {
H5_FAILED();
printf("Can't set fields\n");
goto error;
- }
+ }
if(H5Tset_offset(tid1, 3)<0) {
H5_FAILED();
printf("Can't set offset\n");
@@ -719,12 +719,12 @@ test_derived_flt(void)
if(H5Tget_precision(tid1)!=42) {
H5_FAILED();
printf("Can't get precision or wrong precision\n");
- goto error;
+ goto error;
}
if(H5Tget_offset(tid1)!=3) {
H5_FAILED();
printf("Can't get offset or wrong offset\n");
- goto error;
+ goto error;
}
if((size = H5Tget_size(tid1))!=7) {
H5_FAILED();
@@ -734,7 +734,7 @@ test_derived_flt(void)
if(H5Tget_ebias(tid1)!=511) {
H5_FAILED();
printf("Can't get exponent bias or wrong bias\n");
- goto error;
+ goto error;
}
/* Convert data from native integer to the 1st derived floating-point type.
@@ -754,16 +754,16 @@ test_derived_flt(void)
/* Convert data from native integer to derived floating-point type.
* The mantissa is big enough to retain the integer's precision. */
- if(H5Tconvert(H5T_NATIVE_INT, tid1, nelmts, buf, NULL, dxpl_id)<0) {
+ if(H5Tconvert(H5T_NATIVE_INT, tid1, nelmts, buf, NULL, dxpl_id)<0) {
H5_FAILED();
printf("Can't convert data\n");
- goto error;
+ goto error;
}
/* Convert data from the derived floating-point type back to native integer. */
- if(H5Tconvert(tid1, H5T_NATIVE_INT, nelmts, buf, NULL, dxpl_id)<0) {
+ if(H5Tconvert(tid1, H5T_NATIVE_INT, nelmts, buf, NULL, dxpl_id)<0) {
H5_FAILED();
printf("Can't convert data\n");
- goto error;
+ goto error;
}
/* Are the values still the same?*/
@@ -772,7 +772,7 @@ test_derived_flt(void)
if(buf[i*src_size+j]!=saved_buf[i*src_size+j])
break;
if(j==src_size)
- continue; /*no error*/
+ continue; /*no error*/
/* Print errors */
if (0==fails_this_test++) {
@@ -807,16 +807,16 @@ test_derived_flt(void)
if(buf) free(buf);
if(saved_buf) free(saved_buf);
if(aligned) free(aligned);
- buf = NULL;
+ buf = NULL;
saved_buf = NULL;
aligned = NULL;
/*--------------------------------------------------------------------------
* 2nd floating-point type
- * size=3 byte, precision=24 bits, offset=0 bits, mantissa size=16 bits,
- * mantissa position=0, exponent size=7 bits, exponent position=16, exponent
+ * size=3 byte, precision=24 bits, offset=0 bits, mantissa size=16 bits,
+ * mantissa position=0, exponent size=7 bits, exponent position=16, exponent
* bias=63. It can be illustrated in little-endian order as
- *
+ *
* 2 1 0
* SEEEEEEE MMMMMMMM MMMMMMMM
*--------------------------------------------------------------------------*/
@@ -824,7 +824,7 @@ test_derived_flt(void)
H5_FAILED();
printf("Can't set fields\n");
goto error;
- }
+ }
if(H5Tset_offset(tid2, 0)<0) {
H5_FAILED();
printf("Can't set offset\n");
@@ -881,12 +881,12 @@ test_derived_flt(void)
if(H5Tget_precision(tid2)!=24) {
H5_FAILED();
printf("Can't get precision or wrong precision\n");
- goto error;
+ goto error;
}
if(H5Tget_offset(tid2)!=0) {
H5_FAILED();
printf("Can't get offset or wrong offset\n");
- goto error;
+ goto error;
}
if((size = H5Tget_size(tid2))!=3) {
H5_FAILED();
@@ -896,7 +896,7 @@ test_derived_flt(void)
if(H5Tget_ebias(tid2)!=63) {
H5_FAILED();
printf("Can't get exponent bias or wrong bias\n");
- goto error;
+ goto error;
}
/* Convert data from the 2nd to the 1st derived floating-point type.
@@ -915,18 +915,18 @@ test_derived_flt(void)
buf[i] = saved_buf[i] = HDrand();
/* Convert data from the 2nd to the 1st derived floating-point type.
- * The mantissa and exponent of the 2nd type are big enough to retain
+ * The mantissa and exponent of the 2nd type are big enough to retain
* the precision and exponent power. */
- if(H5Tconvert(tid2, tid1, nelmts, buf, NULL, dxpl_id)<0) {
+ if(H5Tconvert(tid2, tid1, nelmts, buf, NULL, dxpl_id)<0) {
H5_FAILED();
printf("Can't convert data\n");
- goto error;
+ goto error;
}
/* Convert data from the 1st back to the 2nd derived floating-point type. */
- if(H5Tconvert(tid1, tid2, nelmts, buf, NULL, dxpl_id)<0) {
+ if(H5Tconvert(tid1, tid2, nelmts, buf, NULL, dxpl_id)<0) {
H5_FAILED();
printf("Can't convert data\n");
- goto error;
+ goto error;
}
/* Are the values still the same?*/
@@ -935,10 +935,10 @@ test_derived_flt(void)
if(buf[i*src_size+j]!=saved_buf[i*src_size+j])
break;
if(j==src_size)
- continue; /*no error*/
+ continue; /*no error*/
- /* If original value is NaN(exponent bits are all ones, 11..11),
- * the library simply sets all mantissa bits to ones. So don't
+ /* If original value is NaN(exponent bits are all ones, 11..11),
+ * the library simply sets all mantissa bits to ones. So don't
* compare values in this case.
*/
if((buf[i*src_size+2]==0x7f && saved_buf[i*src_size+2]==0x7f) ||
@@ -999,7 +999,7 @@ test_derived_flt(void)
PASSED();
reset_hdf5(); /*print statistics*/
-
+
return 0;
error:
@@ -1024,17 +1024,17 @@ test_derived_flt(void)
* Purpose: Tests user-define and query functions of integer types.
*
* Return: Success: 0
- *
+ *
* Failure: number of errors
*
* Programmer: Raymond Lu
* Saturday, Jan 29, 2005
- *
+ *
* Modifications:
*
*-------------------------------------------------------------------------
*/
-static int
+static int
test_derived_integer(void)
{
hid_t file=-1, tid1=-1, tid2=-1;
@@ -1057,43 +1057,43 @@ test_derived_integer(void)
if((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT))<0) {
H5_FAILED();
printf("Can't create file\n");
- goto error;
+ goto error;
}
if((dxpl_id = H5Pcreate(H5P_DATASET_XFER))<0) {
H5_FAILED();
printf("Can't create data transfer property list\n");
- goto error;
+ goto error;
}
if((tid1 = H5Tcopy(H5T_STD_I32LE))<0) {
H5_FAILED();
printf("Can't copy data type\n");
- goto error;
+ goto error;
}
if((tid2 = H5Tcopy(H5T_STD_U64LE))<0) {
H5_FAILED();
printf("Can't copy data type\n");
- goto error;
+ goto error;
}
-
+
/*--------------------------------------------------------------------------
* 1st integer type
* size=3 byte, precision=24 bits, offset=0 bits, order=big endian.
* It can be illustrated in big-endian order as
- *
+ *
* 0 1 2
* SIIIIIII IIIIIIII IIIIIIII
*
- * There's no specific order for these functions to define the attributes
- * of a new integer type, H5Tset_precision, H5Tset_offset, H5Tset_size,
+ * There's no specific order for these functions to define the attributes
+ * of a new integer type, H5Tset_precision, H5Tset_offset, H5Tset_size,
* H5Tset_order, H5Tset_pad, H5Tset_sign.
*--------------------------------------------------------------------------*/
if(H5Tset_offset(tid1,0)<0) {
H5_FAILED();
printf("Can't set offset\n");
- goto error;
+ goto error;
}
if(H5Tset_size(tid1, 3)<0) {
@@ -1105,13 +1105,13 @@ test_derived_integer(void)
if(H5Tset_precision(tid1,24)<0) {
H5_FAILED();
printf("Can't set precision\n");
- goto error;
+ goto error;
}
if(H5Tset_order(tid1, H5T_ORDER_BE)<0) {
H5_FAILED();
printf("Can't set order\n");
- goto error;
+ goto error;
}
if(H5Tcommit(file, "new integer type 1", tid1)<0) {
@@ -1119,7 +1119,7 @@ test_derived_integer(void)
printf("Can't commit data type\n");
goto error;
}
-
+
if(H5Tclose(tid1)<0) {
H5_FAILED();
printf("Can't close datatype\n");
@@ -1135,12 +1135,12 @@ test_derived_integer(void)
if(H5Tget_precision(tid1)!=24) {
H5_FAILED();
printf("Can't get precision or wrong precision\n");
- goto error;
+ goto error;
}
if(H5Tget_offset(tid1)!=0) {
H5_FAILED();
printf("Can't get offset or wrong offset\n");
- goto error;
+ goto error;
}
if(H5Tget_size(tid1)!=3) {
H5_FAILED();
@@ -1157,34 +1157,34 @@ test_derived_integer(void)
* 2nd integer type
* size=8 byte, precision=48 bits, offset=10 bits, order=little endian.
* It can be illustrated in little-endian order as
- *
- * 7 6 5 4 3 2 1 0
+ *
+ * 7 6 5 4 3 2 1 0
* ??????SI IIIIIIII IIIIIIII IIIIIIII IIIIIIII IIIIIIII IIIIII?? ????????
*--------------------------------------------------------------------------*/
if(H5Tset_precision(tid2,48)<0) {
H5_FAILED();
printf("Can't set precision\n");
- goto error;
+ goto error;
}
if(H5Tset_offset(tid2,10)<0) {
H5_FAILED();
printf("Can't set offset\n");
- goto error;
+ goto error;
}
-
+
if(H5Tset_sign(tid2,H5T_SGN_2)<0) {
H5_FAILED();
printf("Can't set offset\n");
- goto error;
+ goto error;
}
-
+
if(H5Tcommit(file, "new integer type 2", tid2)<0) {
H5_FAILED();
printf("Can't commit data type\n");
goto error;
}
-
+
if(H5Tclose(tid2)<0) {
H5_FAILED();
printf("Can't close datatype\n");
@@ -1196,16 +1196,16 @@ test_derived_integer(void)
printf("Can't open datatype\n");
goto error;
}
-
+
if(H5Tget_precision(tid2)!=48) {
H5_FAILED();
printf("Can't get precision or wrong precision\n");
- goto error;
+ goto error;
}
if(H5Tget_offset(tid2)!=10) {
H5_FAILED();
printf("Can't get offset or wrong offset\n");
- goto error;
+ goto error;
}
if(H5Tget_size(tid2)!=8) {
H5_FAILED();
@@ -1234,18 +1234,18 @@ test_derived_integer(void)
buf[i] = saved_buf[i] = HDrand();
/* Convert data from the 1st to the 2nd derived integer type.
- * The precision of the 2nd type are big enough to retain
+ * The precision of the 2nd type are big enough to retain
* the 1st type's precision. */
- if(H5Tconvert(tid1, tid2, nelmts, buf, NULL, dxpl_id)<0) {
+ if(H5Tconvert(tid1, tid2, nelmts, buf, NULL, dxpl_id)<0) {
H5_FAILED();
printf("Can't convert data\n");
- goto error;
+ goto error;
}
/* Convert data from the 2nd back to the 1st derived integer type. */
- if(H5Tconvert(tid2, tid1, nelmts, buf, NULL, dxpl_id)<0) {
+ if(H5Tconvert(tid2, tid1, nelmts, buf, NULL, dxpl_id)<0) {
H5_FAILED();
printf("Can't convert data\n");
- goto error;
+ goto error;
}
/* Are the values still the same?*/
@@ -1254,7 +1254,7 @@ test_derived_integer(void)
if(buf[i*src_size+j]!=saved_buf[i*src_size+j])
break;
if(j==src_size)
- continue; /*no error*/
+ continue; /*no error*/
/* Print errors */
if (0==fails_this_test++) {
@@ -1307,7 +1307,7 @@ test_derived_integer(void)
PASSED();
reset_hdf5(); /*print statistics*/
-
+
return 0;
error:
@@ -1383,7 +1383,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
unsigned long hw_ulong;
long_long hw_llong;
unsigned long_long hw_ullong;
-
+
/* What are the names of the source and destination types */
if (H5Tequal(src, H5T_NATIVE_SCHAR)) {
src_type_name = "signed char";
@@ -1419,7 +1419,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
src_type_name = "UNKNOWN";
src_type = OTHER;
}
-
+
if (H5Tequal(dst, H5T_NATIVE_SCHAR)) {
dst_type_name = "signed char";
dst_type = INT_SCHAR;
@@ -1470,7 +1470,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
HDfflush(stdout);
fails_this_test=0;
}
-
+
/* Some information about datatypes */
endian = H5Tget_order(H5T_NATIVE_INT);
src_size = H5Tget_size(src);
@@ -1995,7 +1995,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
*/
for (k=0; k<src_size; k++)
src_bits[src_size-(k+1)] = saved[j*src_size+ENDIAN(src_size, k)];
-
+
for (k=0; k<dst_size; k++)
dst_bits[dst_size-(k+1)] = buf[j*dst_size+ENDIAN(dst_size, k)];
@@ -2149,7 +2149,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
default:
break;
}
-
+
printf(" dst = ");
for (k=0; k<dst_size; k++)
printf(" %02x", buf[j*dst_size+ENDIAN(dst_size, k)]);
@@ -2198,7 +2198,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
default:
break;
}
-
+
printf(" ans = ");
for (k=0; k<dst_size; k++)
printf(" %02x", hw[ENDIAN(dst_size, k)]);
@@ -2289,7 +2289,7 @@ test_conv_int_2(void)
printf("%-70s", "Testing overlap calculations");
HDfflush(stdout);
-
+
HDmemset(buf, 0, sizeof buf);
for (i=1; i<=32; i++) {
for (j=1; j<=32; j++) {
@@ -2376,7 +2376,7 @@ my_isnan(dtype_t type, void *val)
} else {
return 0;
}
- if (HDstrstr(s, "NaN") || HDstrstr(s, "NAN") || HDstrstr(s, "nan"))
+ if (HDstrstr(s, "NaN") || HDstrstr(s, "NAN") || HDstrstr(s, "nan"))
retval = 1;
}
@@ -2399,7 +2399,7 @@ my_isnan(dtype_t type, void *val)
*-------------------------------------------------------------------------
*/
static int
-my_isinf(dtype_t type, int endian, unsigned char *val, size_t size,
+my_isinf(dtype_t type, int endian, unsigned char *val, size_t size,
size_t mpos, size_t msize, size_t epos, size_t esize)
{
unsigned char *bits;
@@ -2411,7 +2411,7 @@ my_isinf(dtype_t type, int endian, unsigned char *val, size_t size,
for (i=0; i<size; i++)
bits[size-(i+1)] = *(val + ENDIAN(size, i));
- if((ret1=H5T_bit_find(bits, mpos, msize, H5T_BIT_LSB, 1))<0 &&
+ if((ret1=H5T_bit_find(bits, mpos, msize, H5T_BIT_LSB, 1))<0 &&
(ret2=H5T_bit_find(bits, epos, esize, H5T_BIT_LSB, 0))<0)
retval = 1;
@@ -2483,7 +2483,7 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst)
#ifdef HANDLE_SIGFPE
pid_t child_pid; /*process ID of child */
int status; /*child exit status */
-
+
/*
* Some systems generage SIGFPE during floating point overflow and we
* cannot assume that we can continue from such a signal. Therefore, we
@@ -2530,7 +2530,7 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst)
src_type_name = "UNKNOWN";
src_type = OTHER;
}
-
+
if (H5Tequal(dst, H5T_NATIVE_FLOAT)) {
dst_type_name = "float";
dst_type = FLT_FLOAT;
@@ -2586,7 +2586,7 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst)
HDfflush(stdout);
fails_this_test = 0;
}
-
+
/* Get "interesting" values */
src_size = H5Tget_size(src);
dst_size = H5Tget_size(dst);
@@ -2600,8 +2600,8 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst)
/* Allocate buffers */
aligned = HDcalloc(1, MAX(sizeof(long double), sizeof(double)));
- /* Allocate and initialize the source buffer through macro INIT_FP_NORM or INIT_FP_SPECIAL.
- * The BUF will be used for the conversion while the SAVED buffer will be used for
+ /* Allocate and initialize the source buffer through macro INIT_FP_NORM or INIT_FP_SPECIAL.
+ * The BUF will be used for the conversion while the SAVED buffer will be used for
* the comparison later. INIT_FP_NORM will fill in the buffer with regular values like
* normalized and denormalized values; INIT_FP_SPECIAL will fill with special values
* like infinity, NaN.
@@ -2620,26 +2620,26 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst)
} else if(src_type == FLT_LDOUBLE) {
INIT_FP_NORM(long double, LDBL_MAX, LDBL_MIN, LDBL_MAX_10_EXP, LDBL_MIN_10_EXP,
src_size, dst_size, buf, saved, nelmts);
-#endif
+#endif
} else
goto error;
-
+
break;
case TEST_DENORM:
if(src_type == FLT_FLOAT) {
INIT_FP_DENORM(float, FLT_MANT_DIG, src_size, src_nbits, endian, dst_size,
buf, saved, nelmts);
} else if(src_type == FLT_DOUBLE) {
- INIT_FP_DENORM(double, DBL_MANT_DIG, src_size, src_nbits, endian, dst_size,
+ INIT_FP_DENORM(double, DBL_MANT_DIG, src_size, src_nbits, endian, dst_size,
buf, saved, nelmts);
#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE!=0
} else if(src_type == FLT_LDOUBLE) {
- INIT_FP_DENORM(long double, LDBL_MANT_DIG, src_size, src_nbits, endian, dst_size,
+ INIT_FP_DENORM(long double, LDBL_MANT_DIG, src_size, src_nbits, endian, dst_size,
buf, saved, nelmts);
-#endif
+#endif
} else
goto error;
-
+
break;
case TEST_SPECIAL:
@@ -2653,7 +2653,7 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst)
} else if(src_type == FLT_LDOUBLE) {
INIT_FP_SPECIAL(src_size, src_nbits, endian, LDBL_MANT_DIG, dst_size,
buf, saved, nelmts);
-#endif
+#endif
} else
goto error;
@@ -2709,14 +2709,14 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst)
}
#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE
} else {
- HDmemcpy(aligned, saved+j*sizeof(long double), sizeof(long double));
+ HDmemcpy(aligned, saved+j*sizeof(long double), sizeof(long double));
if (FLT_FLOAT==dst_type) {
- hw_f = *((long double*)aligned);
+ hw_f = *((long double*)aligned);
hw = (unsigned char*)&hw_f;
underflow = HDfabsl(*((long double*)aligned)) < FLT_MIN;
overflow = HDfabsl(*((long double*)aligned)) > FLT_MAX;
} else if (FLT_DOUBLE==dst_type) {
- hw_d = *((long double*)aligned);
+ hw_d = *((long double*)aligned);
hw = (unsigned char*)&hw_d;
underflow = HDfabsl(*((long double*)aligned)) < DBL_MIN;
overflow = HDfabsl(*((long double*)aligned)) > DBL_MAX;
@@ -2731,11 +2731,11 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst)
}
/* For Intel machines, the size of "long double" is 12 bytes, precision
- * is 80 bits; for Intel IA64 and AMD processors, the size of "long double"
- * is 16 bytes, precision is 80 bits. During hardware conversion, the
- * last few unused bytes may have garbage in them. Clean them out with
+ * is 80 bits; for Intel IA64 and AMD processors, the size of "long double"
+ * is 16 bytes, precision is 80 bits. During hardware conversion, the
+ * last few unused bytes may have garbage in them. Clean them out with
* 0s before compare the values.
- */
+ */
#if H5_SIZEOF_LONG_DOUBLE !=0
if(endian==H5T_ORDER_LE && dst_type==FLT_LDOUBLE) {
unsigned int q;
@@ -2791,7 +2791,7 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst)
* If the src number is smaller than the dst MIN float number,
* consider it okay if the converted sw and hw dst are both
* less than or equal to the dst MIN float number.
- * If overflow happens when the src value is greater than
+ * If overflow happens when the src value is greater than
* the maximum dst value, the library assign INFINITY to dst.
* This might be different from what the compiler does, i.e.
* the SGI compiler assigns the dst's maximal value.
@@ -2799,14 +2799,14 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst)
{
double check_mant[2];
int check_expo[2];
-
+
if (FLT_FLOAT==dst_type) {
float x;
HDmemcpy(&x, &buf[j*dst_size], sizeof(float));
if (underflow &&
HDfabsf(x) <= FLT_MIN && HDfabsf(hw_f) <= FLT_MIN)
continue; /* all underflowed, no error */
- if (overflow && my_isinf(dst_type, endian, buf+j*sizeof(float),
+ if (overflow && my_isinf(dst_type, endian, buf+j*sizeof(float),
dst_size, dst_mpos, dst_msize, dst_epos, dst_esize))
continue; /* all overflowed, no error */
check_mant[0] = HDfrexpf(x, check_expo+0);
@@ -2817,7 +2817,7 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst)
if (underflow &&
HDfabs(x) <= DBL_MIN && HDfabs(hw_d) <= DBL_MIN)
continue; /* all underflowed, no error */
- if (overflow && my_isinf(dst_type, endian, buf+j*sizeof(double),
+ if (overflow && my_isinf(dst_type, endian, buf+j*sizeof(double),
dst_size, dst_mpos, dst_msize, dst_epos, dst_esize))
continue; /* all overflowed, no error */
check_mant[0] = HDfrexp(x, check_expo+0);
@@ -2896,7 +2896,7 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst)
}
}
printf(" elmt %u\n", (unsigned)j);
-
+
printf(" src =");
for (k=0; k<src_size; k++)
printf(" %02x", saved[j*src_size+ENDIAN(src_size,k)]);
@@ -2950,14 +2950,14 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst)
HDfprintf(stdout," %29.20Le\n", hw_ld);
#endif
- /* If the source is normalized values, print out error message; if it is
+ /* If the source is normalized values, print out error message; if it is
* denormalized or special values, print out warning message.*/
if (++fails_all_tests>=max_fails) {
if(run_test==TEST_NORMAL)
HDputs(" maximum failures reached, aborting test...");
else if(run_test==TEST_DENORM || run_test==TEST_SPECIAL)
HDputs(" maximum warnings reached, aborting test...");
-
+
goto done;
}
}
@@ -2980,7 +2980,7 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst)
HDexit(0);
#else
reset_hdf5();
-
+
/* If the source is normalized values, treat the failures as error;
* if it is denormalized or special values, treat the failure as warning.*/
if(run_test==TEST_NOOP || run_test==TEST_NORMAL)
@@ -3012,14 +3012,14 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst)
/*-------------------------------------------------------------------------
* Function: test_conv_int_fp
*
- * Purpose: Test conversion between integer and float values
+ * Purpose: Test conversion between integer and float values
* from SRC to DST. These types should be any combination of:
*
* H5T_NATIVE_SCHAR H5T_NATIVE_FLOAT
* H5T_NATIVE_SHORT H5T_NATIVE_DOUBLE
* H5T_NATIVE_INT H5T_NATIVE_LDOUBLE
- * H5T_NATIVE_LONG
- * H5T_NATIVE_LLONG
+ * H5T_NATIVE_LONG
+ * H5T_NATIVE_LLONG
*
* Return: Success: 0
*
@@ -3181,7 +3181,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
if ((INT_SCHAR==src_type || INT_UCHAR==src_type || INT_SHORT==src_type ||
INT_USHORT==src_type || INT_INT==src_type || INT_UINT==src_type ||
INT_LONG==src_type || INT_ULONG==src_type || INT_LLONG==src_type ||
- INT_ULLONG==src_type) &&
+ INT_ULLONG==src_type) &&
(FLT_FLOAT!=dst_type && FLT_DOUBLE!=dst_type
#if H5_SIZEOF_LONG_DOUBLE !=0
&& FLT_LDOUBLE!=dst_type
@@ -3202,7 +3202,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
)
&& (INT_SCHAR!=dst_type && INT_UCHAR!=dst_type && INT_SHORT!=dst_type
&& INT_USHORT!=dst_type && INT_INT!=dst_type && INT_UINT!=dst_type
- && INT_LONG!=dst_type && INT_ULONG!=dst_type && INT_LLONG!=dst_type
+ && INT_LONG!=dst_type && INT_ULONG!=dst_type && INT_LLONG!=dst_type
&& INT_ULLONG!=dst_type)) {
sprintf(str, "Testing %s %s -> %s conversions",
name, src_type_name, dst_type_name);
@@ -3248,22 +3248,22 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
#endif
/* This is for some Linux systems where long double has the size
- * 12 bytes but precision is 10 bytes. The 2 unused bytes may
+ * 12 bytes but precision is 10 bytes. The 2 unused bytes may
* have garbage causing wrong value comparison.
*/
HDmemset(&hw_ldouble, 0, sizeof(long double));
- /* Create a dataset transfer property list and datatype conversion
+ /* Create a dataset transfer property list and datatype conversion
* exception handler function and pass in fill value. This is mainly
* for NetCDF compatibility, which requests fill in fill value when
- * conversion exception happens. We only test (unsigned) int - float
+ * conversion exception happens. We only test (unsigned) int - float
* and float - (unsigned) int conversions, which should cover more cases.
*/
if((dxpl_id = H5Pcreate(H5P_DATASET_XFER))<0)
goto error;
- if((src_type == INT_INT && dst_type == FLT_FLOAT) ||
- (src_type == INT_UINT && dst_type == FLT_FLOAT) ||
+ if((src_type == INT_INT && dst_type == FLT_FLOAT) ||
+ (src_type == INT_UINT && dst_type == FLT_FLOAT) ||
(src_type == FLT_FLOAT && dst_type == INT_UINT) ||
(src_type == FLT_FLOAT && dst_type == INT_INT)) {
if(H5Pset_type_conv_cb(dxpl_id, except_func, &fill_value)<0)
@@ -3276,7 +3276,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
if(op != except_func || *(int*)user_data != fill_value)
goto error;
- }
+ }
/* Allocate and initialize the source buffer through macro INIT_INTEGER if the source is integer,
* INIT_FP_NORM if floating-point. The BUF will be used for the conversion while the SAVED buffer will be
@@ -3317,7 +3317,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
INIT_FP_NORM(double, DBL_MAX, DBL_MIN, DBL_MAX_10_EXP, DBL_MIN_10_EXP,
src_size, dst_size, buf, saved, nelmts);
} else if(run_test==TEST_DENORM) {
- INIT_FP_DENORM(double, DBL_MANT_DIG, src_size, src_nbits, endian, dst_size,
+ INIT_FP_DENORM(double, DBL_MANT_DIG, src_size, src_nbits, endian, dst_size,
buf, saved, nelmts);
} else {
INIT_FP_SPECIAL(src_size, src_nbits, endian, DBL_MANT_DIG, dst_size, buf, saved, nelmts);
@@ -3328,12 +3328,12 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
INIT_FP_NORM(long double, LDBL_MAX, LDBL_MIN, LDBL_MAX_10_EXP, LDBL_MIN_10_EXP,
src_size, dst_size, buf, saved, nelmts);
} else if(run_test==TEST_DENORM) {
- INIT_FP_DENORM(long double, LDBL_MANT_DIG, src_size, src_nbits, endian, dst_size,
+ INIT_FP_DENORM(long double, LDBL_MANT_DIG, src_size, src_nbits, endian, dst_size,
buf, saved, nelmts);
} else {
INIT_FP_SPECIAL(src_size, src_nbits, endian, LDBL_MANT_DIG, dst_size, buf, saved, nelmts);
- }
-#endif
+ }
+#endif
} else
goto error;
@@ -3701,13 +3701,13 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
/* Make certain that there isn't some weird number of destination bits */
assert(dst_nbits%8==0);
-
+
/* For Intel machines, the size of "long double" is 12 bytes, precision
* is 80 bits; for AMD processors, the size of "long double" is 16 bytes,
- * precision is 80 bits. During hardware conversion, the last few unused
- * bytes may have garbage in them. Clean them out with 0s before compare
+ * precision is 80 bits. During hardware conversion, the last few unused
+ * bytes may have garbage in them. Clean them out with 0s before compare
* the values.
- */
+ */
#if H5_SIZEOF_LONG_DOUBLE !=0
if(endian==H5T_ORDER_LE && dst_type==FLT_LDOUBLE) {
unsigned int q;
@@ -3732,7 +3732,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
*/
for (k=0; k<src_size; k++)
src_bits[src_size-(k+1)] = saved[j*src_size+ENDIAN(src_size, k)];
-
+
for (k=0; k<dst_size; k++)
dst_bits[dst_size-(k+1)] = buf[j*dst_size+ENDIAN(dst_size, k)];
@@ -3741,8 +3741,8 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
* hardware conversion result during overflows is usually garbage
* so we must handle those cases differetly when checking results.
*
- * Test user's exception handler when overflows:
- * Try to follow the except_func callback function to check if the
+ * Test user's exception handler when overflows:
+ * Try to follow the except_func callback function to check if the
* desired value was set.
*/
if ((FLT_FLOAT==src_type || FLT_DOUBLE==src_type
@@ -3750,7 +3750,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
|| FLT_LDOUBLE==src_type
#endif
)
- && (INT_SCHAR==dst_type || INT_SHORT==dst_type || INT_INT==dst_type
+ && (INT_SCHAR==dst_type || INT_SHORT==dst_type || INT_INT==dst_type
|| INT_LONG==dst_type || INT_LLONG==dst_type)) {
if(0==H5T_bit_get_d(src_bits, src_nbits-1, 1) &&
overflows(src_bits, src, dst_nbits-1)) {
@@ -3791,7 +3791,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
|| FLT_LDOUBLE==src_type
#endif
)
- && (INT_UCHAR==dst_type || INT_USHORT==dst_type || INT_UINT==dst_type
+ && (INT_UCHAR==dst_type || INT_USHORT==dst_type || INT_UINT==dst_type
|| INT_ULONG==dst_type || INT_ULLONG==dst_type)) {
if (H5T_bit_get_d(src_bits, src_nbits-1, 1)) {
/*
@@ -3821,7 +3821,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
}
}
}
-/* On some machines (notably the SGI and Solaris 64-bit machines) unsigned long
+/* On some machines (notably the SGI and Solaris 64-bit machines) unsigned long
* values are not converted to float or double values correctly, they are
* consistently off by the lowest bit being rounded oppositely to our
* software conversion routines output. So, on those machines, we allow
@@ -3851,8 +3851,8 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
} /* end if */
#endif /* end H5_ULONG_FP_BOTTOM_BIT_WORKS */
-/* For PGI compiler on Linux, during conversion from 'float' or 'double' to
-* 'unsigned long long', round-up happens when the fraction of float-point
+/* For PGI compiler on Linux, during conversion from 'float' or 'double' to
+* 'unsigned long long', round-up happens when the fraction of float-point
* value is greater than 0.5. So we allow the converted value to be off by 1.
*/
#ifndef H5_FP_TO_ULLONG_BOTTOM_BIT_WORKS
@@ -3882,7 +3882,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
}
#endif
#endif /*end H5_ULLONG_TO_LDOUBLE_PRECISION_WORKS*/
-
+
/* Print errors */
if (0==fails_this_test++) {
if(run_test==TEST_NORMAL) {
@@ -3955,7 +3955,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
case OTHER:
break;
}
-
+
printf(" dst = ");
for (k=0; k<dst_size; k++)
printf(" %02x", buf[j*dst_size+ENDIAN(dst_size, k)]);
@@ -4018,7 +4018,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
case OTHER:
break;
}
-
+
printf(" ans = ");
for (k=0; k<dst_size; k++)
printf(" %02x", hw[ENDIAN(dst_size, k)]);
@@ -4069,14 +4069,14 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
break;
}
- /* If the source is normalized values, print out error message; if it is
+ /* If the source is normalized values, print out error message; if it is
* denormalized or special values, print out warning message.*/
if (++fails_all_tests>=max_fails) {
if(run_test==TEST_NORMAL)
HDputs(" maximum failures reached, aborting test...");
else if(run_test==TEST_DENORM || run_test==TEST_SPECIAL)
HDputs(" maximum warnings reached, aborting test...");
-
+
goto done;
}
}
@@ -4115,9 +4115,9 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
/*-------------------------------------------------------------------------
* Function: overflows
*
- * Purpose: When convert from float or double to any integer type,
- * check if overflow occurs.
- *
+ * Purpose: When convert from float or double to any integer type,
+ * check if overflow occurs.
+ *
*
* Return: TRUE: overflow happens
*
@@ -4145,10 +4145,10 @@ overflows(unsigned char *origin_bits, hid_t src_id, size_t dst_num_bits)
HDmemset(bits, 0, 32);
HDmemset(mant_bits, 0, 32);
- /*
- * Sometimes, type size isn't equal to the precision like Linux's "long
- * double", where size is 96 bits and precision is 80 bits.
- */
+ /*
+ * Sometimes, type size isn't equal to the precision like Linux's "long
+ * double", where size is 96 bits and precision is 80 bits.
+ */
src_prec = H5Tget_precision(src_id);
H5Tget_fields(src_id, NULL, &epos, &expt_digits, &mpos, &mant_digits);
@@ -4167,7 +4167,7 @@ overflows(unsigned char *origin_bits, hid_t src_id, size_t dst_num_bits)
H5T_BIT_LSB, TRUE)<0 && H5T_bit_find (bits, epos, expt_digits,
H5T_BIT_LSB, FALSE)<0) {
/*This is a special case for the source of no implied mantissa bit.
- *If the exponent bits are all 1s and only the 1st bit of mantissa
+ *If the exponent bits are all 1s and only the 1st bit of mantissa
*is set to 1. It's infinity. The Intel-Linux "long double" is this case.*/
ret_value=TRUE;
goto done;
@@ -4175,16 +4175,16 @@ overflows(unsigned char *origin_bits, hid_t src_id, size_t dst_num_bits)
/* get exponent */
expt = H5T_bit_get_d(bits, mant_digits, expt_digits) - bias;
-
+
if(expt>=(dst_num_bits-1)) {
ret_value=TRUE;
goto done;
- }
+ }
/* get significand */
H5T_bit_copy (mant_bits, 0, bits, 0, mant_digits);
-
+
/* restore implicit bit if normalization is implied*/
if(norm == H5T_NORM_IMPLIED) {
H5T_bit_inc(mant_bits, mant_digits, 1);
@@ -4200,7 +4200,7 @@ overflows(unsigned char *origin_bits, hid_t src_id, size_t dst_num_bits)
ret_value=TRUE;
done:
- return ret_value;
+ return ret_value;
}
@@ -4395,7 +4395,7 @@ run_fp_tests(const char *name)
goto done;
}
- /*Test normalized values. TEST_NORMAL indicates normalized values.*/
+ /*Test normalized values. TEST_NORMAL indicates normalized values.*/
nerrors += test_conv_flt_1(name, TEST_NORMAL, H5T_NATIVE_FLOAT, H5T_NATIVE_DOUBLE);
nerrors += test_conv_flt_1(name, TEST_NORMAL, H5T_NATIVE_DOUBLE, H5T_NATIVE_FLOAT);
#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE !=0
@@ -4405,7 +4405,7 @@ run_fp_tests(const char *name)
nerrors += test_conv_flt_1(name, TEST_NORMAL, H5T_NATIVE_LDOUBLE, H5T_NATIVE_DOUBLE);
#endif
- /*Test denormalized values. TEST_DENORM indicates denormalized values.*/
+ /*Test denormalized values. TEST_DENORM indicates denormalized values.*/
nerrors += test_conv_flt_1(name, TEST_DENORM, H5T_NATIVE_FLOAT, H5T_NATIVE_DOUBLE);
nerrors += test_conv_flt_1(name, TEST_DENORM, H5T_NATIVE_DOUBLE, H5T_NATIVE_FLOAT);
#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE!=0
@@ -4457,7 +4457,7 @@ run_int_fp_conv(const char *name)
nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_SHORT, H5T_NATIVE_FLOAT);
nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_SHORT, H5T_NATIVE_DOUBLE);
-
+
nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_USHORT, H5T_NATIVE_FLOAT);
nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_USHORT, H5T_NATIVE_DOUBLE);
@@ -4466,7 +4466,7 @@ run_int_fp_conv(const char *name)
nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_UINT, H5T_NATIVE_FLOAT);
nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_UINT, H5T_NATIVE_DOUBLE);
-
+
#if H5_SIZEOF_LONG!=H5_SIZEOF_INT
nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_LONG, H5T_NATIVE_FLOAT);
nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_LONG, H5T_NATIVE_DOUBLE);
@@ -4543,7 +4543,7 @@ run_int_fp_conv(const char *name)
#else
HDputs(" Test skipped due to disabled long double.");
#endif
-
+
}
#endif /*H5_SW_INTEGER_TO_LDOUBLE_WORKS*/
@@ -4572,7 +4572,7 @@ run_fp_int_conv(const char *name)
int test_values;
int i;
int run_test = TRUE;
-
+
#ifndef H5_FP_TO_INTEGER_OVERFLOW_WORKS
/* For Cray X1, the compiler generates floating exception when the
* conversion overflows. So disable all of the conversions from
@@ -4581,45 +4581,45 @@ run_fp_int_conv(const char *name)
run_test = FALSE;
#endif
- if(run_test) {
+ if(run_test) {
for(i=0; i<3; i++) {
if(i==0)
test_values = TEST_NORMAL;
else if(i==1)
test_values = TEST_DENORM;
- else
+ else
test_values = TEST_SPECIAL;
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_SCHAR);
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_SCHAR);
-
+
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_UCHAR);
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_UCHAR);
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_SHORT);
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_SHORT);
-
+
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_USHORT);
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_USHORT);
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_INT);
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_INT);
-
+
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_UINT);
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_UINT);
-
+
#if H5_SIZEOF_LONG!=H5_SIZEOF_INT
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_LONG);
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_LONG);
-
+
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_ULONG);
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_ULONG);
#endif
-
+
#if H5_SIZEOF_LONG_LONG!=H5_SIZEOF_LONG
if(!strcmp(name, "hw")) { /* Hardware conversion */
/* Windows .NET 2003 doesn't work for hardware conversion of this case.
- * .NET should define this macro H5_HW_FP_TO_LLONG_NOT_WORKS. */
+ * .NET should define this macro H5_HW_FP_TO_LLONG_NOT_WORKS. */
#ifndef H5_HW_FP_TO_LLONG_NOT_WORKS
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_LLONG);
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_LLONG);
@@ -4647,7 +4647,7 @@ run_fp_int_conv(const char *name)
SKIPPED();
HDputs(" Test skipped due to hardware conversion error.");
}
-#endif /*H5_FP_TO_ULLONG_RIGHT_MAXIMUM*/
+#endif /*H5_FP_TO_ULLONG_RIGHT_MAXIMUM*/
#endif
#if H5_SW_LDOUBLE_TO_INTEGER_WORKS
@@ -4659,7 +4659,7 @@ run_fp_int_conv(const char *name)
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_INT);
#if H5_CV_LDOUBLE_TO_UINT_WORKS
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_UINT);
-#else /*H5_CV_LDOUBLE_TO_UINT_WORKS*/
+#else /*H5_CV_LDOUBLE_TO_UINT_WORKS*/
{
char str[256]; /*string */
@@ -4697,7 +4697,7 @@ run_fp_int_conv(const char *name)
HDputs(" Test skipped due to disabled long double.");
#endif
}
-#endif /*H5_FP_TO_ULLONG_RIGHT_MAXIMUM*/
+#endif /*H5_FP_TO_ULLONG_RIGHT_MAXIMUM*/
#endif
#endif
#else /*H5_SW_LDOUBLE_TO_INTEGER_WORKS*/
@@ -4739,9 +4739,9 @@ run_fp_int_conv(const char *name)
*
* Purpose: Test the data type(integer and floating-point number).
*
- * Return: Success:
+ * Return: Success:
*
- * Failure:
+ * Failure:
*
* Programmer: Robb Matzke
* Tuesday, December 9, 1997
@@ -4769,11 +4769,11 @@ main(void)
/* Do the tests */
- /* Test user-define, query functions and software conversion
+ /* Test user-define, query functions and software conversion
* for user-defined floating-point types */
nerrors += test_derived_flt();
-
- /* Test user-define, query functions and software conversion
+
+ /* Test user-define, query functions and software conversion
* for user-defined integer types */
nerrors += test_derived_integer();
@@ -4794,10 +4794,10 @@ main(void)
/* Test hardware float-integer conversion functions */
nerrors += run_fp_int_conv("hard");
-
+
/*----------------------------------------------------------------------
* Software tests
- *----------------------------------------------------------------------
+ *----------------------------------------------------------------------
*/
without_hardware_g = TRUE;
reset_hdf5();
@@ -4811,12 +4811,12 @@ main(void)
/* Test software float-integer conversion functions */
nerrors += run_fp_int_conv("soft");
-
+
/* Test software integer-float conversion functions */
nerrors += run_int_fp_conv("soft");
-
+
reset_hdf5();
-
+
if (nerrors) {
printf("***** %lu FAILURE%s! *****\n",
nerrors, 1==nerrors?"":"S");
diff --git a/test/dtransform.c b/test/dtransform.c
index 2c09c76..085014b 100644
--- a/test/dtransform.c
+++ b/test/dtransform.c
@@ -18,22 +18,22 @@ hid_t dset_id_int_chunk;
hid_t dset_id_float_chunk;
-const float windchillFfloat[ROWS][COLS] =
+const float windchillFfloat[ROWS][COLS] =
{ {36.0, 31.0, 25.0, 19.0, 13.0, 7.0, 1.0, -5.0, -11.0, -16.0, -22.0, -28.0, -34.0, -40.0, -46.0, -52.0, -57.0, -63.0 },
- {34.0, 27.0, 21.0, 15.0, 9.0, 3.0, -4.0, -10.0, -16.0, -22.0, -28.0, -35.0, -41.0, -47.0, -53.0, -59.0, -66.0, -72.0 } ,
- {32.0, 25.0, 19.0, 13.0, 6.0, 0.0, -7.0, -13.0, -19.0, -26.0, -32.0, -39.0, -45.0, -51.0, -58.0, -64.0, -71.0, -77.0 },
- {30.0, 24.0, 17.0, 11.0, 4.0, -2.0, -9.0, -15.0, -22.0, -29.0, -35.0, -42.0, -48.0, -55.0, -61.0, -68.0, -74.0, -81.0 },
- {29.0, 23.0, 16.0, 9.0, 3.0, -4.0, -11.0, -17.0, -24.0, -31.0, -37.0, -44.0, -51.0, -58.0, -64.0, -71.0, -78.0, -84.0 },
- {28.0, 22.0, 15.0, 8.0, 1.0, -5.0, -12.0, -19.0, -26.0, -33.0, -39.0, -46.0, -53.0, -60.0, -67.0, -73.0, -80.0, -87.0 },
- {28.0, 21.0, 14.0, 7.0, 0.0, -7.0, -14.0, -21.0, -27.0, -34.0, -41.0, -48.0, -55.0, -62.0, -69.0, -76.0, -82.0, -89.0 },
- {27.0, 20.0, 13.0, 6.0, -1.0, -8.0, -15.0, -22.0, -29.0, -36.0, -43.0, -50.0, -57.0, -64.0, -71.0, -78.0, -84.0, -91.0 },
+ {34.0, 27.0, 21.0, 15.0, 9.0, 3.0, -4.0, -10.0, -16.0, -22.0, -28.0, -35.0, -41.0, -47.0, -53.0, -59.0, -66.0, -72.0 } ,
+ {32.0, 25.0, 19.0, 13.0, 6.0, 0.0, -7.0, -13.0, -19.0, -26.0, -32.0, -39.0, -45.0, -51.0, -58.0, -64.0, -71.0, -77.0 },
+ {30.0, 24.0, 17.0, 11.0, 4.0, -2.0, -9.0, -15.0, -22.0, -29.0, -35.0, -42.0, -48.0, -55.0, -61.0, -68.0, -74.0, -81.0 },
+ {29.0, 23.0, 16.0, 9.0, 3.0, -4.0, -11.0, -17.0, -24.0, -31.0, -37.0, -44.0, -51.0, -58.0, -64.0, -71.0, -78.0, -84.0 },
+ {28.0, 22.0, 15.0, 8.0, 1.0, -5.0, -12.0, -19.0, -26.0, -33.0, -39.0, -46.0, -53.0, -60.0, -67.0, -73.0, -80.0, -87.0 },
+ {28.0, 21.0, 14.0, 7.0, 0.0, -7.0, -14.0, -21.0, -27.0, -34.0, -41.0, -48.0, -55.0, -62.0, -69.0, -76.0, -82.0, -89.0 },
+ {27.0, 20.0, 13.0, 6.0, -1.0, -8.0, -15.0, -22.0, -29.0, -36.0, -43.0, -50.0, -57.0, -64.0, -71.0, -78.0, -84.0, -91.0 },
{26.0, 19.0, 12.0, 5.0, -2.0, -9.0, -16.0, -23.0, -30.0, -37.0, -44.0, -51.0, -58.0, -65.0, -72.0, -79.0, -86.0, -93.0 },
{26.0, 19.0, 12.0, 4.0, -3.0, -10.0, -17.0, -24.0, -31.0, -38.0, -45.0, -52.0, -60.0, -67.0, -74.0, -81.0, -88.0, -95.0},
- {25.0, 18.0, 11.0, 4.0, -3.0, -11.0, -18.0, -25.0, -32.0, -39.0, -46.0, -54.0, -61.0, -68.0, -75.0, -82.0, -89.0, -97.0},
- {25.0, 17.0, 10.0, 3.0, -4.0, -11.0, -19.0, -26.0, -33.0, -40.0, -48.0, -55.0, -62.0, -69.0, -76.0, -84.0, -91.0, -98.0}
+ {25.0, 18.0, 11.0, 4.0, -3.0, -11.0, -18.0, -25.0, -32.0, -39.0, -46.0, -54.0, -61.0, -68.0, -75.0, -82.0, -89.0, -97.0},
+ {25.0, 17.0, 10.0, 3.0, -4.0, -11.0, -19.0, -26.0, -33.0, -40.0, -48.0, -55.0, -62.0, -69.0, -76.0, -84.0, -91.0, -98.0}
};
-const int transformData[ROWS][COLS] =
+const int transformData[ROWS][COLS] =
{ {36, 31, 25, 19, 13, 7, 1, 5, 11, 16, 22, 28, 34, 40, 46, 52, 57, 63 },
{34, 27, 21, 15, 9, 3, 4, 10, 16, 22, 28, 35, 41, 47, 53, 59, 66, 72 } ,
{32, 25, 19, 13, 6, 0, 7, 13, 19, 26, 32, 39, 45, 51, 58, 64, 71, 77 },
@@ -63,7 +63,7 @@ const int transformData[ROWS][COLS] =
} \
} \
PASSED(); \
-}
+}
#define COMPARE(TYPE,VAR1,VAR2,TOL) \
{ \
@@ -80,7 +80,7 @@ const int transformData[ROWS][COLS] =
} \
} \
PASSED(); \
-}
+}
#define TEST_TYPE_CONTIG(XFORM, TYPE, HDF_TYPE, TEST_STR, COMPARE_DATA, SIGNED) \
{ \
@@ -216,7 +216,7 @@ int main(void)
hid_t dxpl_id_c_to_f, dxpl_id_c_to_f_copy, dxpl_id_simple, dxpl_id_polynomial, dxpl_id_polynomial_copy, dxpl_id_utrans_inv, file_id;
const char* c_to_f = "(9/5.0)*x + 32";
- const char* simple = "(4/2) * ( (2 + 4)/(5 - 2.5))"; /* this equals 4.8 */
+ const char* simple = "(4/2) * ( (2 + 4)/(5 - 2.5))"; /* this equals 4.8 */
const char* polynomial = "(2+x)* ((x-8)/2)";
/* inverses the utrans transform in init_test to get back original array */
const char* utrans_inv = "(x/3)*4 - 100";
@@ -231,9 +231,9 @@ int main(void)
if(H5Pset_data_transform(dxpl_id_utrans_inv, utrans_inv)<0) TEST_ERROR;
if((dxpl_id_polynomial_copy = H5Pcopy(dxpl_id_polynomial)) < 0) TEST_ERROR;
if((dxpl_id_c_to_f_copy = H5Pcopy(dxpl_id_c_to_f)) < 0) TEST_ERROR;
-
+
/* Run all the tests */
-
+
if(init_test(&file_id) < 0) TEST_ERROR;
if(test_set() < 0) TEST_ERROR;
@@ -265,7 +265,7 @@ int main(void)
#if H5_SIZEOF_LONG_DOUBLE!=0
TEST_TYPE_CONTIG(dxpl_id_c_to_f, long double, H5T_NATIVE_LDOUBLE, "ldouble", windchillFfloat, 1);
#endif
-
+
TEST_TYPE_CHUNK(dxpl_id_utrans_inv, char, H5T_NATIVE_CHAR, "char", transformData, 0);
TEST_TYPE_CHUNK(dxpl_id_utrans_inv, unsigned char, H5T_NATIVE_UCHAR, "uchar", transformData, 0);
TEST_TYPE_CHUNK(dxpl_id_c_to_f, signed char, H5T_NATIVE_SCHAR, "schar", windchillFfloat, 1);
@@ -293,7 +293,7 @@ int main(void)
#if H5_SIZEOF_LONG_DOUBLE!=0
TEST_TYPE_CHUNK(dxpl_id_c_to_f, long double, H5T_NATIVE_LDOUBLE, "ldouble", windchillFfloat, 1);
#endif
-
+
if(test_copy(dxpl_id_c_to_f_copy, dxpl_id_polynomial_copy) < 0) TEST_ERROR;
if(test_trivial(dxpl_id_simple) < 0) TEST_ERROR;
if(test_poly(dxpl_id_polynomial) < 0) TEST_ERROR;
@@ -314,7 +314,7 @@ int main(void)
return 0;
-
+
error:
return -1;
}
@@ -327,39 +327,39 @@ int init_test(hid_t* file_id)
hid_t dataspace, dxpl_id_f_to_c, dxpl_id_utrans, cparms, filespace;
hsize_t dim[2] = {ROWS, COLS};
- hsize_t offset[2] = {0, 0};
+ hsize_t offset[2] = {0, 0};
if((dxpl_id_f_to_c = H5Pcreate(H5P_DATASET_XFER))<0) TEST_ERROR;
if((dxpl_id_utrans = H5Pcreate(H5P_DATASET_XFER))<0) TEST_ERROR;
-
+
if(H5Pset_data_transform(dxpl_id_f_to_c, f_to_c)<0) TEST_ERROR;
if(H5Pset_data_transform(dxpl_id_utrans, utrans)<0) TEST_ERROR;
-
+
if((*file_id = H5Fcreate("dtransform.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT))<0) TEST_ERROR;
-
+
cparms = H5Pcreate(H5P_DATASET_CREATE);
if(H5Pset_chunk(cparms, 2, dim)<0) TEST_ERROR;
-
+
if((dataspace = H5Screate_simple(2, dim, NULL))<0) TEST_ERROR;
TESTING("Intializing test...")
-
+
if((dset_id_int = H5Dcreate(*file_id, "/default_int", H5T_NATIVE_INT, dataspace, H5P_DEFAULT))<0) TEST_ERROR;
if(H5Dwrite(dset_id_int, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, dxpl_id_f_to_c, windchillFfloat)<0) TEST_ERROR;
-
+
if((dset_id_float = H5Dcreate(*file_id, "/default_float", H5T_NATIVE_FLOAT, dataspace, H5P_DEFAULT))<0) TEST_ERROR;
if(H5Dwrite(dset_id_float, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, dxpl_id_f_to_c, windchillFfloat)<0) TEST_ERROR;
-
- if((dset_id_int_chunk = H5Dcreate(*file_id, "/default_chunk_int", H5T_NATIVE_INT, dataspace, cparms))<0) TEST_ERROR;
- filespace = H5Dget_space (dset_id_int_chunk);
- if(H5Sselect_hyperslab(filespace, H5S_SELECT_SET, offset, NULL, dim, NULL) < 0) TEST_ERROR;
+ if((dset_id_int_chunk = H5Dcreate(*file_id, "/default_chunk_int", H5T_NATIVE_INT, dataspace, cparms))<0) TEST_ERROR;
+
+ filespace = H5Dget_space (dset_id_int_chunk);
+ if(H5Sselect_hyperslab(filespace, H5S_SELECT_SET, offset, NULL, dim, NULL) < 0) TEST_ERROR;
if(H5Dwrite(dset_id_int_chunk, H5T_NATIVE_FLOAT, dataspace, filespace, dxpl_id_f_to_c, windchillFfloat)<0) TEST_ERROR;
- if((dset_id_float_chunk = H5Dcreate(*file_id, "/default_chunk_float", H5T_NATIVE_FLOAT, dataspace, cparms))<0) TEST_ERROR;
- if(H5Dwrite(dset_id_float_chunk, H5T_NATIVE_FLOAT, dataspace, filespace, dxpl_id_f_to_c, windchillFfloat)<0) TEST_ERROR;
+ if((dset_id_float_chunk = H5Dcreate(*file_id, "/default_chunk_float", H5T_NATIVE_FLOAT, dataspace, cparms))<0) TEST_ERROR;
+ if(H5Dwrite(dset_id_float_chunk, H5T_NATIVE_FLOAT, dataspace, filespace, dxpl_id_f_to_c, windchillFfloat)<0) TEST_ERROR;
+
-
PASSED();
@@ -371,7 +371,7 @@ int init_test(hid_t* file_id)
error:
return -1;
}
-
+
int test_poly(const hid_t dxpl_id_polynomial)
{
float polyflres[ROWS][COLS];
@@ -393,7 +393,7 @@ int test_poly(const hid_t dxpl_id_polynomial)
if(H5Dread(dset_id_int, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, dxpl_id_polynomial, polyflread)<0) TEST_ERROR;
COMPARE(float, polyflread, polyflres, 2.0)
-
+
for(row = 0; row<ROWS; row++)
{
for(col = 0; col<COLS; col++)
@@ -430,7 +430,7 @@ int test_copy(const hid_t dxpl_id_c_to_f_copy, const hid_t dxpl_id_polynomial_co
}
}
-
+
TESTING("data transform, linear transform w/ copied property")
if(H5Dread(dset_id_float, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl_id_c_to_f_copy, windchillFintread)<0) TEST_ERROR;
COMPARE(int, windchillFintread, windchillFfloat, 2)
@@ -444,7 +444,7 @@ int test_copy(const hid_t dxpl_id_c_to_f_copy, const hid_t dxpl_id_polynomial_co
error:
return -1;
}
-
+
int test_trivial(const hid_t dxpl_id_simple)
{
float windchillFfloatread[ROWS][COLS];
@@ -492,10 +492,10 @@ int test_getset(const hid_t dxpl_id_c_to_f)
{
int row, col;
float windchillFfloatread[ROWS][COLS];
- const char* simple = "(4/2) * ( (2 + 4)/(5 - 2.5))"; /* this equals 4.8 */
+ const char* simple = "(4/2) * ( (2 + 4)/(5 - 2.5))"; /* this equals 4.8 */
const char* c_to_f = "(9/5.0)*x + 32";
char* ptrgetTest = HDmalloc(HDstrlen(simple)+1);
-
+
TESTING("H5Pget_data_transform")
H5Pget_data_transform(dxpl_id_c_to_f, ptrgetTest, HDstrlen(c_to_f)+1);
if(HDstrcmp(c_to_f, ptrgetTest) != 0)
@@ -508,7 +508,7 @@ int test_getset(const hid_t dxpl_id_c_to_f)
PASSED();
if(H5Pset_data_transform(dxpl_id_c_to_f, simple)<0) TEST_ERROR;
-
+
TESTING("data transform, read after reseting of transform property")
if(H5Dread(dset_id_float, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, dxpl_id_c_to_f, windchillFfloatread)<0) TEST_ERROR;
for(row = 0; row<ROWS; row++)
@@ -524,12 +524,12 @@ int test_getset(const hid_t dxpl_id_c_to_f)
}
}
PASSED();
-
+
HDmemset(ptrgetTest, 0, strlen(c_to_f)+1);
free(ptrgetTest);
ptrgetTest = malloc(strlen(simple)+1);
-
+
HDmemset(ptrgetTest, 0, strlen(simple)+1);
TESTING("H5Pget_data_transform, after resetting transform property")
H5Pget_data_transform(dxpl_id_c_to_f, ptrgetTest, strlen(simple)+1);
@@ -541,8 +541,8 @@ int test_getset(const hid_t dxpl_id_c_to_f)
}
else
PASSED();
-
- free(ptrgetTest);
+
+ free(ptrgetTest);
return 0;
@@ -556,12 +556,12 @@ int test_set(void)
H5E_auto_stack_t func;
const char* str = "(9/5.0)*x + 32";
char* ptrgetTest = malloc(strlen(str)+1);
-
+
if((dxpl_id = H5Pcreate(H5P_DATASET_XFER))<0) TEST_ERROR;
-
+
/* Test get before set */
H5Eget_auto_stack(H5E_DEFAULT,&func,NULL);
-
+
H5Eset_auto_stack(H5E_DEFAULT, NULL, NULL);
TESTING("H5Pget_data_transform (get before set)")
if(H5Pget_data_transform(dxpl_id, ptrgetTest, strlen(str)+1) < 0)
@@ -580,28 +580,28 @@ int test_set(void)
TESTING("H5Pset_data_transform (set with invalid transform 1)")
INVALID_SET_TEST("\0");
-
+
TESTING("H5Pset_data_transform (set with invalid transform 2)")
INVALID_SET_TEST(" ");
-
+
TESTING("H5Pset_data_transform (set with invalid transform 3)")
INVALID_SET_TEST("x+");
-
+
TESTING("H5Pset_data_transform (set with invalid transform 4)")
INVALID_SET_TEST("(x+5");
-
+
TESTING("H5Pset_data_transform (set with invalid transform 5)")
INVALID_SET_TEST("+");
-
+
TESTING("H5Pset_data_transform (set with invalid transform 6)")
INVALID_SET_TEST("(9/5)*x + x**2");
TESTING("H5Pset_data_transform (set with invalid transform 7)")
INVALID_SET_TEST("(9/5)x");
-
+
TESTING("H5Pset_data_transform (set with invalid transform 8)")
INVALID_SET_TEST("(9/5)*x + x^2");
-
+
H5Eset_auto_stack(H5E_DEFAULT, func, NULL);
return 0;
diff --git a/test/dtypes.c b/test/dtypes.c
index 7b301f4..9f366f3 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -30,7 +30,7 @@
#define NTESTELEM 100000
/* For test_compound_10 */
-#define ARRAY_DIM 4
+#define ARRAY_DIM 4
/* Epsilon for floating-point comparisons */
#define FP_EPSILON 0.000001
@@ -82,7 +82,7 @@ typedef struct complex_t {
typedef enum dtype_t {
INT_SCHAR, INT_UCHAR, INT_SHORT, INT_USHORT, INT_INT, INT_UINT,
- INT_LONG, INT_ULONG, INT_LLONG, INT_ULLONG, FLT_FLOAT, FLT_DOUBLE,
+ INT_LONG, INT_ULONG, INT_LLONG, INT_ULLONG, FLT_FLOAT, FLT_DOUBLE,
FLT_LDOUBLE, OTHER
} dtype_t;
@@ -172,11 +172,11 @@ test_classes(void)
TESTING("H5Tget_class()");
/*-------------------------------------------------------------
- * Check class of some atomic types.
+ * Check class of some atomic types.
*-----------------------------------------------------------*/
if ((tcls=H5Tget_class(H5T_NATIVE_INT))<0) TEST_ERROR
if (H5T_INTEGER!=tcls) TEST_ERROR
-
+
if ((tcls=H5Tget_class(H5T_NATIVE_DOUBLE))<0) TEST_ERROR
if (H5T_FLOAT!=tcls) TEST_ERROR
@@ -202,7 +202,7 @@ test_classes(void)
if (H5T_VLEN==tcls) TEST_ERROR
/*-------------------------------------------------------------
- * Check class for member types of compound type.
+ * Check class for member types of compound type.
*-----------------------------------------------------------*/
/* Create a compound datatype and insert some complex types */
if ((cmpd_id = H5Tcreate(H5T_COMPOUND, sizeof(struct complex)))<0) TEST_ERROR
@@ -210,8 +210,8 @@ test_classes(void)
if (H5Tinsert(cmpd_id, "vl_s", HOFFSET(struct complex, vl_s), vls_id)<0) TEST_ERROR
nmembs = H5Tget_nmembers(cmpd_id);
-
- for (i=0;i<nmembs;i++)
+
+ for (i=0;i<nmembs;i++)
{
/* Get member type ID */
if((memb_id = H5Tget_member_type(cmpd_id, i))<0) TEST_ERROR
@@ -343,7 +343,7 @@ test_detect(void)
/*--------------------------------------------------------------------------------
* Test class of a compound type with some atomic types as fields.
*------------------------------------------------------------------------------*/
- /* Create a compound datatype and insert some atomic types */
+ /* Create a compound datatype and insert some atomic types */
if ((atom_cmpd_id = H5Tcreate(H5T_COMPOUND, sizeof(struct atomic)))<0) TEST_ERROR
if (H5Tinsert(atom_cmpd_id, "i", HOFFSET(struct atomic, i), H5T_NATIVE_INT)<0) TEST_ERROR
if (H5Tinsert(atom_cmpd_id, "f", HOFFSET(struct atomic, f), H5T_NATIVE_FLOAT)<0) TEST_ERROR
@@ -438,7 +438,7 @@ test_detect(void)
/* Close atomic VL datatype of char */
if(H5Tclose(atom_vlc_id)<0) TEST_ERROR
-
+
/* Close atomic VL string datatype */
if(H5Tclose(atom_vls_id)<0) TEST_ERROR
@@ -573,7 +573,7 @@ test_compound_2(void)
H5Tinsert(st, "e", HOFFSET(struct st, e), H5T_NATIVE_INT)<0)
goto error;
H5Tclose(array_dt);
-
+
array_dt=H5Tarray_create(H5T_NATIVE_INT,1, &four, NULL);
if ((dt=H5Tcreate(H5T_COMPOUND, sizeof(struct dt)))<0 ||
H5Tinsert(dt, "a", HOFFSET(struct dt, a), H5T_NATIVE_INT)<0 ||
@@ -583,7 +583,7 @@ test_compound_2(void)
H5Tinsert(dt, "e", HOFFSET(struct dt, e), H5T_NATIVE_INT)<0)
goto error;
H5Tclose(array_dt);
-
+
/* Perform the conversion */
if (H5Tconvert(st, dt, nelmts, buf, bkg, H5P_DEFAULT)<0) goto error;
@@ -610,7 +610,7 @@ test_compound_2(void)
goto error;
}
}
-
+
/* Release resources */
free(buf);
free(bkg);
@@ -690,7 +690,7 @@ test_compound_3(void)
H5Tinsert(st, "e", HOFFSET(struct st, e), H5T_NATIVE_INT)<0)
goto error;
H5Tclose(array_dt);
-
+
array_dt=H5Tarray_create(H5T_NATIVE_INT, 1, &four, NULL);
if ((dt=H5Tcreate(H5T_COMPOUND, sizeof(struct dt)))<0 ||
H5Tinsert(dt, "a", HOFFSET(struct dt, a), H5T_NATIVE_INT)<0 ||
@@ -698,7 +698,7 @@ test_compound_3(void)
H5Tinsert(dt, "e", HOFFSET(struct dt, e), H5T_NATIVE_INT)<0)
goto error;
H5Tclose(array_dt);
-
+
/* Perform the conversion */
if (H5Tconvert(st, dt, nelmts, buf, bkg, H5P_DEFAULT)<0)
goto error;
@@ -724,7 +724,7 @@ test_compound_3(void)
goto error;
}
}
-
+
/* Release resources */
free(buf);
free(bkg);
@@ -761,7 +761,7 @@ test_compound_3(void)
static int
test_compound_4(void)
{
-
+
struct st {
int a, b, c[4], d, e;
} *s_ptr;
@@ -808,7 +808,7 @@ test_compound_4(void)
H5Tinsert(st, "e", HOFFSET(struct st, e), H5T_NATIVE_INT)<0)
goto error;
H5Tclose(array_dt);
-
+
array_dt=H5Tarray_create(H5T_NATIVE_INT, 1, &four, NULL);
if ((dt=H5Tcreate(H5T_COMPOUND, sizeof(struct dt)))<0 ||
H5Tinsert(dt, "a", HOFFSET(struct dt, a), H5T_NATIVE_INT)<0 ||
@@ -818,7 +818,7 @@ test_compound_4(void)
H5Tinsert(dt, "e", HOFFSET(struct dt, e), H5T_NATIVE_INT)<0)
goto error;
H5Tclose(array_dt);
-
+
/* Perform the conversion */
if (H5Tconvert(st, dt, nelmts, buf, bkg, H5P_DEFAULT)<0)
goto error;
@@ -846,7 +846,7 @@ test_compound_4(void)
goto error;
}
}
-
+
/* Release resources */
free(buf);
free(bkg);
@@ -901,7 +901,7 @@ test_compound_5(void)
hid_t array_dt;
src_type_t src[2] = {{"one", 102, {104, 105, 106, 107}},
{"two", 202, {204, 205, 206, 207}}};
-
+
dst_type_t *dst;
void *buf = calloc(2, sizeof(dst_type_t));
void *bkg = calloc(2, sizeof(dst_type_t));
@@ -951,8 +951,8 @@ test_compound_5(void)
H5Tclose(short_array);
H5Tclose(int_array);
-
-
+
+
/* Check results */
if (HDmemcmp(src[1].name, dst[1].name, sizeof(src[1].name)) ||
src[1].tdim!=dst[1].tdim ||
@@ -993,7 +993,7 @@ test_compound_5(void)
static int
test_compound_6(void)
{
-
+
struct st {
short b;
short d;
@@ -1028,14 +1028,14 @@ test_compound_6(void)
H5_FAILED();
goto error;
}
-
+
if ((dt=H5Tcreate(H5T_COMPOUND, sizeof(struct dt)))<0 ||
H5Tinsert(dt, "b", HOFFSET(struct dt, b), H5T_NATIVE_LONG)<0 ||
H5Tinsert(dt, "d", HOFFSET(struct dt, d), H5T_NATIVE_LONG)<0) {
H5_FAILED();
goto error;
}
-
+
/* Perform the conversion */
if (H5Tconvert(st, dt, nelmts, buf, bkg, H5P_DEFAULT)<0) {
H5_FAILED();
@@ -1057,7 +1057,7 @@ test_compound_6(void)
goto error;
}
}
-
+
/* Release resources */
free(buf);
free(bkg);
@@ -1080,7 +1080,7 @@ test_compound_6(void)
*
* Purpose: Tests inserting fields into compound datatypes when the field
* overlaps the end of the compound datatype. Also, tests
- * increasing compound type size.
+ * increasing compound type size.
*
* Return: Success: 0
*
@@ -1247,8 +1247,8 @@ test_compound_8(void)
herr_t ret;
TESTING("packing compound data types");
-
- /* Create first compound datatype */
+
+ /* Create first compound datatype */
if((tid1 = H5Tcreate( H5T_COMPOUND, sizeof(struct s1)))<0) {
H5_FAILED(); AT();
printf("Can't create datatype!\n");
@@ -1287,7 +1287,7 @@ test_compound_8(void)
goto error;
} /* end if */
-
+
/* Create second compound datatype */
if((tid2 = H5Tcreate( H5T_COMPOUND, sizeof(struct s2)))<0) {
H5_FAILED(); AT();
@@ -1394,9 +1394,9 @@ test_compound_9(void)
hid_t dset_id;
hsize_t dim1[1];
char filename[1024];
-
+
TESTING("compound data type with VL string");
-
+
/* Create File */
h5_fixname(FILENAME[3], H5P_DEFAULT, filename, sizeof filename);
if((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT))<0) {
@@ -1405,7 +1405,7 @@ test_compound_9(void)
goto error;
} /* end if */
- /* Create first compound datatype */
+ /* Create first compound datatype */
if((cmpd_tid = H5Tcreate( H5T_COMPOUND, sizeof(struct cmpd_struct)))<0) {
H5_FAILED(); AT();
printf("Can't create datatype!\n");
@@ -1417,7 +1417,7 @@ test_compound_9(void)
printf("Can't insert field 'i1'\n");
goto error;
} /* end if */
-
+
str_id = H5Tcopy(H5T_C_S1);
if(H5Tset_size(str_id,H5T_VARIABLE)<0) {
H5_FAILED(); AT();
@@ -1455,7 +1455,7 @@ test_compound_9(void)
goto error;
} /* end if */
- if((dup_tid = H5Tcopy(cmpd_tid))<0) {
+ if((dup_tid = H5Tcopy(cmpd_tid))<0) {
H5_FAILED(); AT();
printf("Can't copy datatype\n");
goto error;
@@ -1493,17 +1493,17 @@ test_compound_9(void)
} /* end if */
if(H5Dclose(dset_id)<0)
- goto error;
+ goto error;
if(H5Tclose(cmpd_tid)<0)
- goto error;
+ goto error;
if(H5Tclose(dup_tid)<0)
goto error;
if(H5Tclose(str_id)<0)
- goto error;
+ goto error;
if(H5Sclose(space_id)<0)
- goto error;
+ goto error;
if(H5Fclose(file)<0)
- goto error;
+ goto error;
if((file=H5Fopen(filename, H5F_ACC_RDONLY, H5P_DEFAULT))<0) {
@@ -1523,8 +1523,8 @@ test_compound_9(void)
printf("cannot open dataset\n");
goto error;
} /* end if */
-
- if((dup_tid = H5Tcopy(cmpd_tid))<0) {
+
+ if((dup_tid = H5Tcopy(cmpd_tid))<0) {
H5_FAILED(); AT();
printf("Can't copy datatype\n");
goto error;
@@ -1548,13 +1548,13 @@ test_compound_9(void)
if(rdata.str) free(rdata.str);
if(H5Dclose(dset_id)<0)
- goto error;
+ goto error;
if(H5Tclose(cmpd_tid)<0)
- goto error;
+ goto error;
if(H5Tclose(dup_tid)<0)
- goto error;
+ goto error;
if(H5Fclose(file)<0)
- goto error;
+ goto error;
PASSED();
return 0;
@@ -1604,8 +1604,8 @@ test_compound_10(void)
int i;
TESTING("array data type of compound type with VL string");
-
- for(i=0; i<ARRAY_DIM; i++) {
+
+ for(i=0; i<ARRAY_DIM; i++) {
wdata[i].i1 = i*10+i;
wdata[i].str = strdup("C string A");
wdata[i].str[9] += i;
@@ -1625,7 +1625,7 @@ test_compound_10(void)
goto error;
} /* end if */
- /* Create first compound datatype */
+ /* Create first compound datatype */
if((cmpd_tid = H5Tcreate( H5T_COMPOUND, sizeof(struct cmpd_struct)))<0) {
H5_FAILED(); AT();
printf("Can't create datatype!\n");
@@ -1637,7 +1637,7 @@ test_compound_10(void)
printf("Can't insert field 'i1'\n");
goto error;
} /* end if */
-
+
cstr_id = H5Tcopy(H5T_C_S1);
if(H5Tset_size(cstr_id,H5T_VARIABLE)<0) {
H5_FAILED(); AT();
@@ -1657,7 +1657,7 @@ test_compound_10(void)
printf("Can't create VL string\n");
goto error;
} /* end if */
-
+
if(H5Tinsert(cmpd_tid, "vl_string",HOFFSET(cmpd_struct, text), vlstr_id)<0) {
H5_FAILED(); AT();
printf("Can't insert field 'text'\n");
@@ -1669,7 +1669,7 @@ test_compound_10(void)
printf("Can't insert field 'i2'\n");
goto error;
} /* end if */
-
+
/* Create the array data type for c_string data */
if((arr_tid = H5Tarray_create(cmpd_tid,1,arr_dim, NULL))<0) {
H5_FAILED(); AT();
@@ -1703,19 +1703,19 @@ test_compound_10(void)
} /* end if */
for(i=0; i<ARRAY_DIM; i++) {
- if(rdata[i].i1!=wdata[i].i1 || rdata[i].i2!=wdata[i].i2 ||
+ if(rdata[i].i1!=wdata[i].i1 || rdata[i].i2!=wdata[i].i2 ||
strcmp(rdata[i].str, wdata[i].str)) {
H5_FAILED(); AT();
printf("incorrect read data\n");
goto error;
} /* end if */
-
+
if(rdata[i].text.len!=wdata[i].text.len) {
H5_FAILED(); AT();
printf("incorrect VL length\n");
goto error;
} /* end if */
-
+
t1 = rdata[i].text.p;
t2 = wdata[i].text.p;
if(strcmp((char*)t1, (char*)t2)) {
@@ -1731,19 +1731,19 @@ test_compound_10(void)
} /* end for */
if(H5Dclose(dset_id)<0)
- goto error;
+ goto error;
if(H5Tclose(cmpd_tid)<0)
- goto error;
+ goto error;
if(H5Tclose(arr_tid)<0)
- goto error;
+ goto error;
if(H5Tclose(cstr_id)<0)
- goto error;
+ goto error;
if(H5Tclose(vlstr_id)<0)
- goto error;
+ goto error;
if(H5Sclose(space_id)<0)
- goto error;
+ goto error;
if(H5Fclose(file)<0)
- goto error;
+ goto error;
PASSED();
return 0;
@@ -1973,8 +1973,8 @@ test_compound_11(void)
/*-------------------------------------------------------------------------
* Function: test_compound_12
*
- * Purpose: Tests size adjustment of compound data types. Start with
- * no member and 0 size, increase the size as inserting
+ * Purpose: Tests size adjustment of compound data types. Start with
+ * no member and 0 size, increase the size as inserting
* members.
*
* Return: Success: 0
@@ -2000,44 +2000,44 @@ test_compound_12(void)
/* Create a compound type of minimal size */
if ((complex_id = H5Tcreate(H5T_COMPOUND, 1))<0) goto error;
-
+
/* Verify the size */
- if((new_size=H5Tget_size(complex_id))==0) goto error;
+ if((new_size=H5Tget_size(complex_id))==0) goto error;
if(new_size!=1) goto error;
/* Add a couple fields and adjust the size */
offset = size;
- if((tmp_size=H5Tget_size(H5T_NATIVE_DOUBLE))==0) goto error;
+ if((tmp_size=H5Tget_size(H5T_NATIVE_DOUBLE))==0) goto error;
size+=tmp_size;
if (H5Tset_size(complex_id, size)<0) goto error;
if (H5Tinsert(complex_id, "real", offset,
H5T_NATIVE_DOUBLE)<0) goto error;
offset = size;
- if((tmp_size=H5Tget_size(H5T_NATIVE_DOUBLE))==0) goto error;
+ if((tmp_size=H5Tget_size(H5T_NATIVE_DOUBLE))==0) goto error;
size+=tmp_size;
if (H5Tset_size(complex_id, size)<0) goto error;
if (H5Tinsert(complex_id, "imaginary", offset,
H5T_NATIVE_DOUBLE)<0) goto error;
/* Increase and decrease the size. */
- if((tmp_size=H5Tget_size(H5T_NATIVE_DOUBLE))==0) goto error;
+ if((tmp_size=H5Tget_size(H5T_NATIVE_DOUBLE))==0) goto error;
size+=tmp_size;
if (H5Tset_size(complex_id, size)<0) goto error;
-
- if((tmp_size=H5Tget_size(H5T_NATIVE_DOUBLE))==0) goto error;
+
+ if((tmp_size=H5Tget_size(H5T_NATIVE_DOUBLE))==0) goto error;
size-=tmp_size;
if (H5Tset_size(complex_id, size)<0) goto error;
/* Verify the size */
- if((new_size=H5Tget_size(complex_id))==0) goto error;
+ if((new_size=H5Tget_size(complex_id))==0) goto error;
if(new_size!=size) goto error;
/* Tries to cut last member. Supposed to fail. */
size--;
H5E_BEGIN_TRY {
ret = H5Tset_size(complex_id, size);
- } H5E_END_TRY;
+ } H5E_END_TRY;
if(ret>=0) {
H5_FAILED();
puts(" Tries to cut off the last member. Should have failed.");
@@ -2059,12 +2059,12 @@ test_compound_12(void)
* Purpose: Tests query functions of compound and enumeration types.
*
* Return: Success: 0
- *
+ *
* Failure: number of errors
*
* Programmer: Raymond Lu
* Thursday, April 4, 2002
- *
+ *
* Modifications:
* Raymond Lu
* Wednesday, Febuary 9, 2005
@@ -2072,7 +2072,7 @@ test_compound_12(void)
* H5Tget_member_value.
*-------------------------------------------------------------------------
*/
-static int
+static int
test_query(void)
{
struct s1 {
@@ -2095,7 +2095,7 @@ test_query(void)
goto error;
/* Create a compound datatype */
- if((tid1=H5Tcreate(H5T_COMPOUND, sizeof(struct s1)))<0) {
+ if((tid1=H5Tcreate(H5T_COMPOUND, sizeof(struct s1)))<0) {
H5_FAILED();
printf("Can't create datatype!\n");
goto error;
@@ -2248,7 +2248,7 @@ test_query(void)
printf("Incorrect value for enum member\n");
goto error;
} /* end if */
-
+
/* Query member value by member index, for enumeration type */
if(H5Tget_member_value (tid2, 2, &enum_val)<0) {
H5_FAILED();
@@ -2260,7 +2260,7 @@ test_query(void)
printf("Incorrect value for enum member\n");
goto error;
} /* end if */
-
+
/* Query member name by member value, for enumeration type */
enum_val = 14;
if(H5Tenum_nameof(tid2, &enum_val, enum_name, 16)<0) {
@@ -2328,7 +2328,7 @@ test_transient (hid_t fapl)
hid_t file=-1, type=-1, space=-1, dset=-1, t2=-1;
char filename[1024];
herr_t status;
-
+
TESTING("transient data types");
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
@@ -2411,7 +2411,7 @@ test_transient (hid_t fapl)
if ((t2=H5Tcopy (dset))<0) goto error;
if (H5Tset_precision (t2, 256)<0) goto error;
if (H5Tclose (t2)<0) goto error;
-
+
H5Dclose (dset);
H5Fclose (file);
@@ -2457,7 +2457,7 @@ test_named (hid_t fapl)
hsize_t i,j;
unsigned attr_data[10][20];
char filename[1024];
-
+
TESTING("named data types");
h5_fixname(FILENAME[1], fapl, filename, sizeof filename);
@@ -2541,7 +2541,7 @@ test_named (hid_t fapl)
HDputs (" Opened named types should be named types!");
goto error;
}
-
+
/* Create a dataset that uses the named type */
if ((dset = H5Dcreate (file, "dset1", type, space, H5P_DEFAULT))<0) {
goto error;
@@ -2589,7 +2589,7 @@ test_named (hid_t fapl)
goto error;
}
if (H5Tclose (t2)<0) goto error;
-
+
/*
* Get the dataset data type by applying H5Tcopy() to the dataset. The
* result should be modifiable.
@@ -2797,7 +2797,7 @@ test_conv_str_1(void)
HDfree(buf);
if (H5Tclose(src_type)<0) goto error;
if (H5Tclose(dst_type)<0) goto error;
-
+
/*
* Test C string to Fortran and vice versa.
*/
@@ -2852,7 +2852,7 @@ test_conv_str_1(void)
HDfree(buf);
if (H5Tclose(src_type)<0) goto error;
if (H5Tclose(dst_type)<0) goto error;
-
+
/*
* Test C buffer to Fortran and vice versa.
*/
@@ -3066,11 +3066,11 @@ test_conv_enum_1(void)
* Purpose: Tests enumeration conversions where source isn't a native type.
*
* Return: Success: 0
- *
+ *
* Failure: number of errors
*
* Programmer: Robb Matzke, LLNL, 2003-06-09
- *
+ *
* Modifications:
*-------------------------------------------------------------------------
*/
@@ -3141,7 +3141,7 @@ test_conv_enum_2(void)
nerrors, NTESTELEM);
return 1;
}
-
+
PASSED();
return 0;
}
@@ -3282,7 +3282,7 @@ static int
test_opaque(void)
{
int num_errors = 0;
-
+
TESTING("opaque datatypes");
/* Test opaque types with tags */
@@ -3337,10 +3337,10 @@ opaque_check(int tag_it)
/* Build source and destination types */
if ((st=H5Tcreate(H5T_OPAQUE, 4))<0) goto error;
if (H5Tset_tag(st, "opaque source type")<0) goto error;
-
+
if ((dt=H5Tcreate(H5T_OPAQUE, 4))<0) goto error;
if (tag_it) {
- if (H5Tset_tag(dt, "opaque destination type")<0)
+ if (H5Tset_tag(dt, "opaque destination type")<0)
goto error;
}
@@ -3365,7 +3365,7 @@ opaque_check(int tag_it)
printf(" unexpected number of opaque conversions\n");
goto error;
}
-
+
/* Unregister conversion function */
if (H5Tunregister(H5T_PERS_HARD, "o_test", st, dt, convert_opaque)<0)
goto error;
@@ -3418,7 +3418,7 @@ opaque_long(void)
ret = H5Tset_tag(dt, long_tag);
} H5E_END_TRY;
if(ret!=FAIL) TEST_ERROR
-
+
/* Close datatype */
if(H5Tclose(dt) < 0) TEST_ERROR
@@ -3441,17 +3441,17 @@ opaque_long(void)
* Purpose: Tests functions of encoding and decoding data type.
*
* Return: Success: 0
- *
+ *
* Failure: number of errors
*
* Programmer: Raymond Lu
* July 14, 2004
- *
+ *
* Modifications:
*
*-------------------------------------------------------------------------
*/
-static int
+static int
test_encode(void)
{
struct s1 {
@@ -3482,7 +3482,7 @@ test_encode(void)
*-----------------------------------------------------------------------
*/
/* Create a compound datatype */
- if((tid1=H5Tcreate(H5T_COMPOUND, sizeof(struct s1)))<0) {
+ if((tid1=H5Tcreate(H5T_COMPOUND, sizeof(struct s1)))<0) {
H5_FAILED();
printf("Can't create datatype!\n");
goto error;
@@ -3539,7 +3539,7 @@ test_encode(void)
printf("Can't insert field into enumeration type\n");
goto error;
} /* end if */
-
+
/*-----------------------------------------------------------------------
* Test encoding and decoding compound and enumerate data types
*-----------------------------------------------------------------------
@@ -3596,7 +3596,7 @@ test_encode(void)
goto error;
} /* end if */
-
+
/* Encode enumerate type in a buffer */
if(H5Tencode(tid2, NULL, &enum_buf_size)<0) {
H5_FAILED();
@@ -3838,9 +3838,9 @@ test_encode(void)
*
* Purpose: Test the data type interface.
*
- * Return: Success:
+ * Return: Success:
*
- * Failure:
+ * Failure:
*
* Programmer: Robb Matzke
* Tuesday, December 9, 1997
diff --git a/test/enum.c b/test/enum.c
index b80d488..13769b5 100644
--- a/test/enum.c
+++ b/test/enum.c
@@ -55,7 +55,7 @@ test_named(hid_t file)
hid_t type=-1, cwg=-1;
c_e1 val;
signed char val8;
-
+
TESTING("named enumeration types");
if ((cwg=H5Gcreate(file, "test_named", 0))<0) goto error;
@@ -92,7 +92,7 @@ test_named(hid_t file)
if (H5Tenum_insert(type, "BLACK", CPTR(val8, E1_BLACK))<0) goto error;
if (H5Tcommit(cwg, "e1_c", type)<0) goto error;
if (H5Tclose(type)<0) goto error;
-
+
if (H5Gclose(cwg)<0) goto error;
PASSED();
return 0;
@@ -159,7 +159,7 @@ test_noconv(hid_t file)
goto error;
}
}
-
+
if (H5Dclose(dset)<0) goto error;
if (H5Sclose(space)<0) goto error;
if (H5Tclose(type)<0) goto error;
@@ -241,7 +241,7 @@ test_tr1(hid_t file)
goto error;
}
}
-
+
if (H5Dclose(dset)<0) goto error;
if (H5Sclose(space)<0) goto error;
if (H5Tclose(m_type)<0) goto error;
@@ -260,7 +260,7 @@ test_tr1(hid_t file)
} H5E_END_TRY;
return 1;
}
-
+
/*-------------------------------------------------------------------------
* Function: test_tr2
@@ -321,7 +321,7 @@ test_tr2(hid_t file)
goto error;
}
}
-
+
if (H5Dclose(dset)<0) goto error;
if (H5Sclose(space)<0) goto error;
if (H5Tclose(m_type)<0) goto error;
@@ -340,7 +340,7 @@ test_tr2(hid_t file)
} H5E_END_TRY;
return 1;
}
-
+
/*-------------------------------------------------------------------------
* Function: test_value_dsnt_exist
@@ -348,8 +348,8 @@ test_tr2(hid_t file)
* Purpose: Create an enumeration datatype with "gaps in values"
* and then request a name of non-existing value within
* an existing range by calling H5Tenum_nameof function.
- * Function should fail instead of succeeding and returning
- * a name of one of the existing values.
+ * Function should fail instead of succeeding and returning
+ * a name of one of the existing values.
* Request a value by supplying non-existing name by calling
* H5Tenum_nameof function. Function should fail.
*
@@ -375,15 +375,15 @@ test_value_dsnt_exist(void)
size_t size = 100;
TESTING("for non-existing name and value");
/* Turn off error reporting since we expect failure in this test */
-
- if (H5Eset_auto_stack(H5E_DEFAULT, NULL, NULL) < 0) goto error;
+
+ if (H5Eset_auto_stack(H5E_DEFAULT, NULL, NULL) < 0) goto error;
if ((datatype_id = H5Tenum_create(H5T_NATIVE_INT))< 0) goto error;
- /* These calls should fail, since no memebrs exist yet */
- if (H5Tenum_valueof(datatype_id, "SAX", &val) >= 0) goto error;
+ /* These calls should fail, since no memebrs exist yet */
+ if (H5Tenum_valueof(datatype_id, "SAX", &val) >= 0) goto error;
val = 3;
- if (H5Tenum_nameof(datatype_id, &val, nam, size) >= 0) goto error;
+ if (H5Tenum_nameof(datatype_id, &val, nam, size) >= 0) goto error;
val = 2;
if (H5Tenum_insert(datatype_id, "TWO", (int *)&val) < 0) goto error;
@@ -391,32 +391,32 @@ test_value_dsnt_exist(void)
if (H5Tenum_insert(datatype_id, "SIX", (int *)&val) < 0) goto error;
val = 10;
if (H5Tenum_insert(datatype_id, "TEN", (int *)&val) < 0) goto error;
-
+
/* This call should fail since we did not create a member with value = 3*/
val = 3;
- if (H5Tenum_nameof(datatype_id, &val, nam, size) >= 0) goto error;
+ if (H5Tenum_nameof(datatype_id, &val, nam, size) >= 0) goto error;
/* This call should fail since we did not create a member with value = 11*/
val = 11;
- if (H5Tenum_nameof(datatype_id, &val, nam, size) >= 0) goto error;
+ if (H5Tenum_nameof(datatype_id, &val, nam, size) >= 0) goto error;
/* This call should fail since we did not create a member with value = 0*/
val = 0;
- if (H5Tenum_nameof(datatype_id, &val, nam, size) >= 0) goto error;
+ if (H5Tenum_nameof(datatype_id, &val, nam, size) >= 0) goto error;
/* This call should fail since we do not have SAX name in the type */
- if (H5Tenum_valueof(datatype_id, "SAX", &val) >= 0) goto error;
+ if (H5Tenum_valueof(datatype_id, "SAX", &val) >= 0) goto error;
/* This call should fail since we do not have TEEN name in the type */
- if (H5Tenum_valueof(datatype_id, "TEEN", &val) >= 0) goto error;
+ if (H5Tenum_valueof(datatype_id, "TEEN", &val) >= 0) goto error;
/* This call should fail since we do not have A name in the type */
- if (H5Tenum_valueof(datatype_id, "A", &val) >= 0) goto error;
+ if (H5Tenum_valueof(datatype_id, "A", &val) >= 0) goto error;
if (H5Tclose(datatype_id) < 0) goto error;
PASSED();
return 0;
-
+
error:
H5E_BEGIN_TRY {
H5Tclose(datatype_id);
@@ -428,11 +428,11 @@ test_value_dsnt_exist(void)
/*-------------------------------------------------------------------------
* Function: main
*
- * Purpose:
+ * Purpose:
*
- * Return: Success:
+ * Return: Success:
*
- * Failure:
+ * Failure:
*
* Programmer: Robb Matzke
* Tuesday, December 22, 1998
@@ -447,7 +447,7 @@ main(void)
hid_t fapl=-1, file=-1;
char name[1024];
int nerrors=0;
-
+
h5_reset();
fapl = h5_fileaccess();
@@ -461,9 +461,9 @@ main(void)
nerrors += test_tr1(file);
nerrors += test_tr2(file);
nerrors += test_value_dsnt_exist();
-
+
H5Fclose(file);
-
+
if (nerrors) goto error;
puts("All enum tests passed.");
h5_cleanup(FILENAME, fapl);
diff --git a/test/err_compat.c b/test/err_compat.c
index 740fe42..addf097 100644
--- a/test/err_compat.c
+++ b/test/err_compat.c
@@ -14,7 +14,7 @@
/*
* Programmer: Raymond Lu
- * October 14, 2001
+ * October 14, 2001
*
* Purpose: Tests Error API
*/
@@ -23,7 +23,7 @@
#ifndef H5_WANT_H5_V1_6_COMPAT
int main(void)
{
- printf("Test skipped because backward compatbility with v1.6 is NOT configured in\n");
+ printf("Test skipped because backward compatbility with v1.6 is NOT configured in\n");
return 0;
}
#else
@@ -39,7 +39,7 @@ const char *FILENAME[] = {
int ipoints2[DIM0][DIM1], icheck2[DIM0][DIM1];
#define DSET_NAME "a_dataset"
-#define FAKE_ID -1
+#define FAKE_ID -1
herr_t custom_print_cb(int n, H5E_error_t *err_desc, void* client_data);
@@ -69,10 +69,10 @@ test_error(hid_t file)
const char *FUNC_test_error="test_error";
H5E_auto_t old_func;
void *old_data;
-
+
TESTING("error API based on data I/O");
fprintf(stderr, "\n");
-
+
/* Create the data space */
dims[0] = DIM0;
dims[1] = DIM1;
@@ -82,11 +82,11 @@ test_error(hid_t file)
H5E_BEGIN_TRY {
dataset = H5Dcreate(FAKE_ID, DSET_NAME, H5T_STD_I32BE, space, H5P_DEFAULT);
} H5E_END_TRY;
-
+
/* Create the dataset */
if ((dataset = H5Dcreate(file, DSET_NAME, H5T_STD_I32BE, space,
H5P_DEFAULT))<0) {
- H5Epush(__FILE__, FUNC_test_error, __LINE__, H5E_ERROR, H5E_CANTCREATE,
+ H5Epush(__FILE__, FUNC_test_error, __LINE__, H5E_ERROR, H5E_CANTCREATE,
"H5Dcreate failed");
goto error;
}
@@ -94,9 +94,9 @@ test_error(hid_t file)
/* Test enabling and disabling default printing */
if (H5Eget_auto(&old_func, &old_data)<0)
TEST_ERROR;
- if (old_data != NULL)
+ if (old_data != NULL)
TEST_ERROR;
- if (!old_func)
+ if (!old_func)
TEST_ERROR;
if (old_func != (H5E_auto_t)H5Eprint)
TEST_ERROR;
@@ -106,7 +106,7 @@ test_error(hid_t file)
/* Make H5Dwrite fail, verify default print is disabled */
if (H5Dwrite(FAKE_ID, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, ipoints2)<0) {
- H5Epush(__FILE__, FUNC_test_error, __LINE__, H5E_ERROR, H5E_WRITEERROR,
+ H5Epush(__FILE__, FUNC_test_error, __LINE__, H5E_ERROR, H5E_WRITEERROR,
"H5Dwrite shouldn't succeed");
goto error;
}
@@ -116,8 +116,8 @@ test_error(hid_t file)
/* In case program comes to this point, close dataset */
if(H5Dclose(dataset)<0) TEST_ERROR;
-
- TEST_ERROR;
+
+ TEST_ERROR;
error:
return -1;
@@ -125,7 +125,7 @@ test_error(hid_t file)
/*-------------------------------------------------------------------------
- * Function: dump_error
+ * Function: dump_error
*
* Purpose: Prints error stack in default and customized ways.
*
@@ -141,19 +141,19 @@ test_error(hid_t file)
*
*-------------------------------------------------------------------------
*/
-static herr_t
+static herr_t
dump_error(void)
{
/* Print errors in library default way */
fprintf(stderr, "********* Print error stack in HDF5 default way *********\n");
if(H5Eprint(stderr)<0)
TEST_ERROR;
-
+
/* Customized way to print errors */
fprintf(stderr, "\n********* Print error stack in customized way *********\n");
if(H5Ewalk(H5E_WALK_UPWARD, custom_print_cb, stderr)<0)
TEST_ERROR;
-
+
return 0;
error:
@@ -177,7 +177,7 @@ dump_error(void)
*
*-------------------------------------------------------------------------
*/
-herr_t
+herr_t
custom_print_cb(int n, H5E_error_t *err_desc, void* client_data)
{
FILE *stream = (FILE *)client_data;
@@ -204,7 +204,7 @@ custom_print_cb(int n, H5E_error_t *err_desc, void* client_data)
error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
* Function: main
@@ -227,17 +227,17 @@ main(void)
fprintf(stderr, " This program tests the Error API compatible with HDF5 v1.6. There're supposed to be some error messages\n");
fapl = h5_fileaccess();
-
+
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0)
TEST_ERROR ;
- /* Test error stack */
+ /* Test error stack */
/* Push an error onto error stack */
- H5Epush(__FILE__, FUNC_main, __LINE__, H5E_ERROR, H5E_BADVALUE,
+ H5Epush(__FILE__, FUNC_main, __LINE__, H5E_ERROR, H5E_BADVALUE,
"Error test failed");
-
+
/* Print out the errors on stack */
dump_error();
@@ -246,7 +246,7 @@ main(void)
/* Test error API */
if(test_error(file)<0) {
- H5Epush(__FILE__, FUNC_main, __LINE__, H5E_ERROR, H5E_BADMESG,
+ H5Epush(__FILE__, FUNC_main, __LINE__, H5E_ERROR, H5E_BADMESG,
"Error test failed");
H5Eprint(stderr);
}
diff --git a/test/error_test.c b/test/error_test.c
index 9fff2a8..b7994a0 100644
--- a/test/error_test.c
+++ b/test/error_test.c
@@ -14,7 +14,7 @@
/*
* Programmer: Raymond Lu
- * October 14, 2001
+ * October 14, 2001
*
* Purpose: Tests the H5Tget_native_type function.
*/
@@ -23,7 +23,7 @@
#ifdef H5_WANT_H5_V1_6_COMPAT
int main(void)
{
- printf("Test skipped because backward compatbility with v1.6 is configured in\n");
+ printf("Test skipped because backward compatbility with v1.6 is configured in\n");
return 0;
}
#else
@@ -105,7 +105,7 @@ test_error(hid_t file)
const char *FUNC_test_error="test_error";
H5E_auto_stack_t old_func;
void *old_data;
-
+
TESTING("error API based on data I/O");
/* Create the data space */
@@ -117,11 +117,11 @@ test_error(hid_t file)
H5E_BEGIN_TRY {
dataset = H5Dcreate(FAKE_ID, DSET_NAME, H5T_STD_I32BE, space, H5P_DEFAULT);
} H5E_END_TRY;
-
+
/* Create the dataset */
if ((dataset = H5Dcreate(file, DSET_NAME, H5T_STD_I32BE, space,
H5P_DEFAULT))<0) {
- H5Epush_stack(H5E_DEFAULT, __FILE__, FUNC_test_error, __LINE__, ERR_CLS, ERR_MAJ_IO, ERR_MIN_CREATE,
+ H5Epush_stack(H5E_DEFAULT, __FILE__, FUNC_test_error, __LINE__, ERR_CLS, ERR_MAJ_IO, ERR_MIN_CREATE,
"H5Dcreate failed");
goto error;
}
@@ -129,7 +129,7 @@ test_error(hid_t file)
/* Test enabling and disabling default printing */
if (H5Eget_auto_stack(H5E_DEFAULT, &old_func, &old_data)<0)
TEST_ERROR;
- if (old_data != NULL)
+ if (old_data != NULL)
TEST_ERROR;
if (old_func != (H5E_auto_stack_t)H5Eprint_stack)
TEST_ERROR;
@@ -139,7 +139,7 @@ test_error(hid_t file)
/* Make H5Dwrite fail, verify default print is disabled */
if (H5Dwrite(FAKE_ID, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, ipoints2)>=0) {
- H5Epush_stack(H5E_DEFAULT, __FILE__, FUNC_test_error, __LINE__, ERR_CLS, ERR_MAJ_IO, ERR_MIN_WRITE,
+ H5Epush_stack(H5E_DEFAULT, __FILE__, FUNC_test_error, __LINE__, ERR_CLS, ERR_MAJ_IO, ERR_MIN_WRITE,
"H5Dwrite shouldn't succeed");
goto error;
}
@@ -149,19 +149,19 @@ test_error(hid_t file)
/* Test saving and restoring the current error stack */
if (H5Dwrite(FAKE_ID, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, ipoints2)<0) {
- H5Epush_stack(H5E_DEFAULT, __FILE__, FUNC_test_error, __LINE__, ERR_CLS, ERR_MAJ_IO, ERR_MIN_WRITE,
+ H5Epush_stack(H5E_DEFAULT, __FILE__, FUNC_test_error, __LINE__, ERR_CLS, ERR_MAJ_IO, ERR_MIN_WRITE,
"H5Dwrite failed as supposed to");
estack_id = H5Eget_current_stack();
H5Dclose(dataset);
H5Sclose(space);
H5Eset_current_stack(estack_id);
- goto error;
+ goto error;
}
/* In case program comes to this point, close dataset */
if(H5Dclose(dataset)<0) TEST_ERROR;
-
- TEST_ERROR;
+
+ TEST_ERROR;
error:
return -1;
@@ -185,7 +185,7 @@ test_error(hid_t file)
*
*-------------------------------------------------------------------------
*/
-static herr_t
+static herr_t
init_error(void)
{
ssize_t cls_size = (ssize_t)HDstrlen(ERR_CLS_NAME)+1;
@@ -193,15 +193,15 @@ init_error(void)
ssize_t msg_size = (ssize_t)HDstrlen(ERR_MIN_SUBROUTINE_MSG) + 1;
char *msg = HDmalloc(HDstrlen(ERR_MIN_SUBROUTINE_MSG)+1);
H5E_type_t *msg_type= HDmalloc(sizeof(H5E_type_t));
-
+
if((ERR_CLS = H5Eregister_class(ERR_CLS_NAME, PROG_NAME, PROG_VERS))<0)
TEST_ERROR;
- if(cls_size != H5Eget_class_name(ERR_CLS, cls_name, (size_t)cls_size) + 1)
+ if(cls_size != H5Eget_class_name(ERR_CLS, cls_name, (size_t)cls_size) + 1)
TEST_ERROR;
- if(strcmp(ERR_CLS_NAME, cls_name))
+ if(strcmp(ERR_CLS_NAME, cls_name))
TEST_ERROR;
-
+
if((ERR_MAJ_TEST = H5Ecreate_msg(ERR_CLS, H5E_MAJOR, ERR_MAJ_TEST_MSG))<0)
TEST_ERROR;
if((ERR_MAJ_IO = H5Ecreate_msg(ERR_CLS, H5E_MAJOR, ERR_MAJ_IO_MSG))<0)
@@ -255,31 +255,31 @@ init_error(void)
*
*-------------------------------------------------------------------------
*/
-static herr_t
+static herr_t
error_stack(void)
{
int err_num;
const char *FUNC_error_stack="error_stack";
-
+
if((err_num = H5Eget_num(H5E_DEFAULT))<0)
TEST_ERROR;
if(err_num)
TEST_ERROR;
-
+
if((ERR_STACK = H5Eget_current_stack())<0)
TEST_ERROR;
/* Make it push error, force this function to fail */
if((err_num = H5Eget_num(ERR_STACK))==0) {
- H5Epush_stack(ERR_STACK, __FILE__, FUNC_error_stack, __LINE__, ERR_CLS, ERR_MAJ_API, ERR_MIN_GETNUM,
+ H5Epush_stack(ERR_STACK, __FILE__, FUNC_error_stack, __LINE__, ERR_CLS, ERR_MAJ_API, ERR_MIN_GETNUM,
"Get number test failed, returned %d", err_num);
goto error;
- }
-
- /* In case program falls through here, close the stack and let it fail. */
+ }
+
+ /* In case program falls through here, close the stack and let it fail. */
if(H5Eclose_stack(ERR_STACK)<0)
TEST_ERROR;
-
+
return -1;
error:
@@ -303,7 +303,7 @@ error_stack(void)
*
*-------------------------------------------------------------------------
*/
-herr_t
+herr_t
long_desc_cb(unsigned n, const H5E_error_t *err_desc, void* client_data)
{
char *real_desc = (char *)client_data;
@@ -332,7 +332,7 @@ long_desc_cb(unsigned n, const H5E_error_t *err_desc, void* client_data)
*
*-------------------------------------------------------------------------
*/
-static herr_t
+static herr_t
test_long_desc(void)
{
char *format="Testing very long description string, %s";
@@ -377,7 +377,7 @@ error:
/*-------------------------------------------------------------------------
- * Function: dump_error
+ * Function: dump_error
*
* Purpose: Prints error stack in default and customized ways.
*
@@ -393,19 +393,19 @@ error:
*
*-------------------------------------------------------------------------
*/
-static herr_t
+static herr_t
dump_error(hid_t estack)
{
/* Print errors in library default way */
fprintf(stderr, "********* Print error stack in HDF5 default way *********\n");
if(H5Eprint_stack(estack, stderr)<0)
TEST_ERROR;
-
+
/* Customized way to print errors */
fprintf(stderr, "\n********* Print error stack in customized way *********\n");
if(H5Ewalk_stack(estack, H5E_WALK_UPWARD, custom_print_cb, stderr)<0)
TEST_ERROR;
-
+
return 0;
error:
@@ -429,7 +429,7 @@ dump_error(hid_t estack)
*
*-------------------------------------------------------------------------
*/
-herr_t
+herr_t
custom_print_cb(unsigned n, const H5E_error_t *err_desc, void* client_data)
{
FILE *stream = (FILE *)client_data;
@@ -444,7 +444,7 @@ custom_print_cb(unsigned n, const H5E_error_t *err_desc, void* client_data)
if(H5Eget_msg(err_desc->maj_num, NULL, maj, MSG_SIZE)<0)
TEST_ERROR;
-
+
if(H5Eget_msg(err_desc->min_num, NULL, min, MSG_SIZE)<0)
TEST_ERROR;
@@ -479,19 +479,19 @@ custom_print_cb(unsigned n, const H5E_error_t *err_desc, void* client_data)
*
*-------------------------------------------------------------------------
*/
-static herr_t
+static herr_t
close_error(void)
{
/* Close major errors, let H5Eunregister_class close minor errors */
if(H5Eclose_msg(ERR_MAJ_TEST)<0)
TEST_ERROR ;
-
+
if(H5Eclose_msg(ERR_MAJ_IO)<0)
TEST_ERROR ;
-
+
if(H5Eclose_msg(ERR_MAJ_API)<0)
TEST_ERROR ;
-
+
if(H5Eunregister_class(ERR_CLS)<0)
TEST_ERROR ;
@@ -500,7 +500,7 @@ close_error(void)
error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
* Function: main
@@ -527,22 +527,22 @@ main(void)
/* Initialize errors */
if(init_error()<0)
TEST_ERROR ;
-
+
fapl = h5_fileaccess();
-
+
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0)
TEST_ERROR ;
- /* Test error stack */
+ /* Test error stack */
if(error_stack()<0) {
/* Push an error onto error stack */
- if(H5Epush_stack(ERR_STACK, __FILE__, FUNC_main, __LINE__, ERR_CLS, ERR_MAJ_TEST, ERR_MIN_ERRSTACK,
+ if(H5Epush_stack(ERR_STACK, __FILE__, FUNC_main, __LINE__, ERR_CLS, ERR_MAJ_TEST, ERR_MIN_ERRSTACK,
"Error stack test failed")<0) TEST_ERROR;
-
+
/* Delete an error from the top of error stack */
H5Epop(ERR_STACK, 1);
-
+
/* Print out the errors on stack */
dump_error(ERR_STACK);
@@ -555,7 +555,7 @@ main(void)
/* Test error API */
if(test_error(file)<0) {
- H5Epush_stack(H5E_DEFAULT, __FILE__, FUNC_main, __LINE__, ERR_CLS, ERR_MAJ_TEST, ERR_MIN_SUBROUTINE,
+ H5Epush_stack(H5E_DEFAULT, __FILE__, FUNC_main, __LINE__, ERR_CLS, ERR_MAJ_TEST, ERR_MIN_SUBROUTINE,
"Error test failed, %s", "it's wrong");
estack_id = H5Eget_current_stack();
H5Eprint_stack(estack_id, stderr);
@@ -564,7 +564,7 @@ main(void)
/* Test pushing a very long error description */
if(test_long_desc()<0) TEST_ERROR;
-
+
if (H5Fclose(file)<0) TEST_ERROR ;
h5_cleanup(FILENAME, fapl);
diff --git a/test/extend.c b/test/extend.c
index aaac754..871446a 100644
--- a/test/extend.c
+++ b/test/extend.c
@@ -96,7 +96,7 @@ write_data(const char *msg, hid_t file, const char *name, hid_t cparms, hid_t me
offset[1] = j * NY/2;
if (H5Sselect_hyperslab (file_space, H5S_SELECT_SET, offset,
NULL, half_dims, NULL)<0) TEST_ERROR;
-
+
/* Read */
if (H5Dread (dataset, H5T_NATIVE_INT, half_space, file_space,
H5P_DEFAULT, buf2)<0) TEST_ERROR;
@@ -114,7 +114,7 @@ write_data(const char *msg, hid_t file, const char *name, hid_t cparms, hid_t me
}
}
}
-
+
/* Cleanup */
if (H5Dclose (dataset)<0) TEST_ERROR;
@@ -175,7 +175,7 @@ main (void)
/* Create the file */
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
if ((file = H5Fcreate (filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Create the dataset which is originally NX by NY */
if((cparms = H5Pcreate(H5P_DATASET_CREATE))<0) TEST_ERROR;
if (H5Pset_chunk (cparms, 2, chunk_dims)<0) TEST_ERROR;
diff --git a/test/external.c b/test/external.c
index 5921572..e5e57af 100644
--- a/test/external.c
+++ b/test/external.c
@@ -61,7 +61,7 @@ same_contents (const char *name1, const char *name2)
assert (n1>=0 && (size_t)n1<=sizeof(buf1));
assert (n2>=0 && (size_t)n2<=sizeof(buf2));
assert (n1==n2);
-
+
if (n1<=0 && n2<=0) break;
if (memcmp (buf1, buf2, (size_t)n1)) {
close (fd1);
@@ -103,7 +103,7 @@ test_1a(hid_t file)
char name[256]; /*external file name */
off_t file_offset; /*external file offset */
hsize_t file_size; /*sizeof external file segment */
-
+
TESTING("fixed-size data space, exact storage");
/* Create the dataset */
@@ -123,7 +123,7 @@ test_1a(hid_t file)
/* Test dataset address. Should be undefined. */
if (H5Dget_offset(dset)!=HADDR_UNDEF) goto error;
-
+
if ((dcpl = H5Dget_create_plist (dset))<0) goto error;
if ((n=H5Pget_external_count (dcpl))<0) goto error;
if (1!=n) {
@@ -369,7 +369,7 @@ test_1e(hid_t file)
if (H5Dclose (dset)<0) goto error;
if (H5Sclose (space)<0) goto error;
if (H5Pclose (dcpl)<0) goto error;
-
+
/* Read dataset creation information */
if ((dset = H5Dopen (file, "dset5"))<0) goto error;
if ((dcpl = H5Dget_create_plist (dset))<0) goto error;
@@ -540,7 +540,7 @@ test_1h(void)
{
hid_t dcpl=-1; /*dataset creation properties */
herr_t status; /*return status */
-
+
TESTING("address overflow in external files");
if((dcpl=H5Pcreate(H5P_DATASET_CREATE))<0) goto error;
if (H5Pset_external(dcpl, "ext1.data", (off_t)0, H5F_UNLIMITED-1)<0) goto error;
@@ -617,7 +617,7 @@ test_2 (hid_t fapl)
assert (n==sizeof(part));
close (fd);
}
-
+
/*
* Create the file and an initial group. This causes messages about
* debugging to be emitted before we start playing games with what the
@@ -640,7 +640,7 @@ test_2 (hid_t fapl)
cur_size = 100;
if ((space=H5Screate_simple (1, &cur_size, NULL))<0) goto error;
if ((dset=H5Dcreate(file, "dset1", H5T_NATIVE_INT, space, dcpl))<0)
- goto error;
+ goto error;
/*
* Read the entire dataset and compare with the original
@@ -673,7 +673,7 @@ test_2 (hid_t fapl)
goto error;
}
}
-
+
if (H5Dclose(dset)<0) goto error;
if (H5Pclose(dcpl)<0) goto error;
if (H5Sclose(space)<0) goto error;
@@ -750,7 +750,7 @@ test_3 (hid_t fapl)
printf(" cannot open %s: %s\n", filename, strerror(errno));
goto error;
}
-
+
write(fd, temparray, (i-1)*10);
close (fd);
}
@@ -833,7 +833,7 @@ main (void)
char filename[1024]; /*file name for test_1* funcs */
hid_t grp=-1; /*group to emit diagnostics */
int nerrors=0; /*number of errors */
-
+
h5_reset();
fapl = h5_fileaccess();
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
diff --git a/test/fillval.c b/test/fillval.c
index a5a2886..07da951 100644
--- a/test/fillval.c
+++ b/test/fillval.c
@@ -45,7 +45,7 @@ typedef struct {
char z;
} comp_datatype;
-/* The fill_old.h5 is generated from gen_old_fill.c in HDF5 'test' directory
+/* The fill_old.h5 is generated from gen_old_fill.c in HDF5 'test' directory
* for version 1.4(after 1.4.3). To get this data file, simply compile
* gen_old_fill.c with HDF5 library (before v1.5) and run it. */
#define FILE_COMPATIBLE "fill_old.h5"
@@ -53,16 +53,16 @@ typedef struct {
/*-------------------------------------------------------------------------
- * Function: create_compound_type
+ * Function: create_compound_type
*
- * Purpose: create a compound datatype
+ * Purpose: create a compound datatype
*
- * Return: Success: datatype ID
+ * Return: Success: datatype ID
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * Monday, Jan 26, 2001
+ * Programmer: Raymond Lu
+ * Monday, Jan 26, 2001
*
* Modifications:
*
@@ -71,7 +71,7 @@ typedef struct {
static hid_t create_compound_type(void)
{
hid_t ret_value=-1;
-
+
if((ret_value = H5Tcreate(H5T_COMPOUND, sizeof(comp_datatype)))<0)
goto error;
if(H5Tinsert(ret_value, "a", HOFFSET(comp_datatype,a), H5T_NATIVE_FLOAT)<0)
@@ -80,7 +80,7 @@ static hid_t create_compound_type(void)
goto error;
if(H5Tinsert(ret_value, "y", HOFFSET(comp_datatype,y),
H5T_NATIVE_DOUBLE)<0) goto error;
- if(H5Tinsert(ret_value, "z", HOFFSET(comp_datatype,z), H5T_NATIVE_CHAR)<0)
+ if(H5Tinsert(ret_value, "z", HOFFSET(comp_datatype,z), H5T_NATIVE_CHAR)<0)
goto error;
return ret_value;
@@ -122,7 +122,7 @@ test_getset(void)
struct fill_ss {
short v1, v2;
} fill_ss, fill_ss_rd;
-
+
TESTING("property lists");
/*
@@ -144,7 +144,7 @@ test_getset(void)
H5T_NATIVE_INT)<0) {
goto error;
}
-
+
/*
* Reading the fill value from a dataset creation property list that has
* no fill value should result in a failure.
@@ -230,14 +230,14 @@ test_getset(void)
* Modifications:
* Many new cases have been added to this test since
* the fill value design has been modified.
- *
+ *
*-------------------------------------------------------------------------
*/
static int
test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
{
hid_t file=-1, space=-1, dcpl=-1, comp_type_id=-1;
- hid_t dset1=-1, dset2=-1, dset3=-1, dset4=-1, dset5=-1,
+ hid_t dset1=-1, dset2=-1, dset3=-1, dset4=-1, dset5=-1,
dset6=-1, /* dset7=-1, */ dset8=-1, dset9=-1;
hsize_t cur_size[5] = {2, 8, 8, 4, 2};
hsize_t ch_size[5] = {1, 1, 1, 4, 1};
@@ -248,7 +248,7 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
H5D_alloc_time_t alloc_time;
H5D_fill_time_t fill_time;
comp_datatype rd_c, fill_ctype;
-
+
if (H5D_CHUNKED==layout) {
TESTING("chunked dataset creation");
} else if (H5D_COMPACT==layout) {
@@ -317,16 +317,16 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
if ((dset4=H5Dcreate(file, "dset4", H5T_NATIVE_LONG, space, dcpl))<0)
goto error;
- /* 6. fill value is undefined while fill write time is H5D_FILL_TIME_ALLOC.
+ /* 6. fill value is undefined while fill write time is H5D_FILL_TIME_ALLOC.
* Supposed to fail. */
if(H5Pset_fill_value(dcpl, -1, NULL)<0) goto error;
- if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0) goto error;
+ if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0) goto error;
H5E_BEGIN_TRY {
if(H5Dcreate(file, "dset7", H5T_NATIVE_LONG, space, dcpl)!=FAIL)
goto error;
} H5E_END_TRY;
}
-
+
/* II. Test early space allocation cases */
if (H5Pclose(dcpl)<0) goto error;
@@ -356,13 +356,13 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
/* 3. Write fill value at space allocation time */
if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0) goto error;
if((dset6 = H5Dcreate(file, "dset6", H5T_NATIVE_LONG, space, dcpl))<0)
- goto error;
+ goto error;
- /* 4. fill value is undefined while fill write time is H5D_FILL_TIME_ALLOC.
+ /* 4. fill value is undefined while fill write time is H5D_FILL_TIME_ALLOC.
* Supposed to fail. */
if(H5Pset_fill_value(dcpl, -1, NULL)<0) goto error;
H5E_BEGIN_TRY {
- if(H5Dcreate(file, "dset7", H5T_NATIVE_LONG, space, dcpl)!=FAIL)
+ if(H5Dcreate(file, "dset7", H5T_NATIVE_LONG, space, dcpl)!=FAIL)
goto error;
} H5E_END_TRY;
@@ -416,7 +416,7 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
#endif
if (H5Dclose(dset2)<0) goto error;
if (H5Pclose(dcpl)<0) goto error;
-
+
/* 3. No conversion */
if ((dset3=H5Dopen(file, "dset3"))<0) goto error;
if ((dcpl=H5Dget_create_plist(dset3))<0) goto error;
@@ -494,7 +494,7 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
printf(" %d: Got unallocated space instead of allocated.\n",__LINE__);
printf(" Got %d\n", allocation);
goto error;
- }
+ }
if(H5Pget_alloc_time(dcpl, &alloc_time)<0) goto error;
if(alloc_time != H5D_ALLOC_TIME_EARLY) {
H5_FAILED();
@@ -542,14 +542,14 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
if (H5Dclose(dset6)<0) goto error;
if (H5Pclose(dcpl)<0) goto error;
- /* 3. Compound datatype test */
+ /* 3. Compound datatype test */
if ((dset8=H5Dopen(file, "dset8"))<0) goto error;
if ((dcpl=H5Dget_create_plist(dset8))<0) goto error;
if (H5Pget_fill_value(dcpl, comp_type_id, &rd_c)<0) goto error;
if( rd_c.a != 0 || rd_c.y != fill_ctype.y || rd_c.x != 0 || rd_c.z!='\0') {
H5_FAILED();
puts(" Got wrong fill value");
- printf(" Got rd_c.a=%f, rd_c.y=%f and rd_c.x=%d, rd_c.z=%c\n",
+ printf(" Got rd_c.a=%f, rd_c.y=%f and rd_c.x=%d, rd_c.z=%c\n",
rd_c.a, rd_c.y, rd_c.x, rd_c.z);
}
if (H5Dclose(dset8)<0) goto error;
@@ -591,14 +591,14 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout)
* Thursday, October 1, 1998
*
* Modifications:
- * This function is called by test_rdwr to write and read
+ * This function is called by test_rdwr to write and read
* dataset for different cases.
*
*-------------------------------------------------------------------------
*/
static int
-test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval,
- H5D_fill_time_t fill_time, H5D_layout_t layout,
+test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval,
+ H5D_fill_time_t fill_time, H5D_layout_t layout,
H5T_class_t datatype, hid_t ctype_id)
{
hid_t fspace=-1, mspace=-1, dset1=-1, dset2=-1;
@@ -613,7 +613,7 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval,
comp_datatype *buf_c=NULL;
H5D_space_status_t allocation;
- if (datatype==H5T_INTEGER)
+ if (datatype==H5T_INTEGER)
fillval = *(int*)_fillval;
else if(datatype==H5T_COMPOUND) {
fill_c.a=((comp_datatype*)_fillval)->a;
@@ -624,10 +624,10 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval,
puts("Invalid type for test");
goto error;
}
-
+
/* Create dataset */
if ((fspace=H5Screate_simple(5, cur_size, cur_size))<0) goto error;
- if (datatype==H5T_INTEGER && (dset1=H5Dcreate(file, dname, H5T_NATIVE_INT,
+ if (datatype==H5T_INTEGER && (dset1=H5Dcreate(file, dname, H5T_NATIVE_INT,
fspace, dcpl))<0) goto error;
if (datatype==H5T_COMPOUND && (dset2=H5Dcreate(file, dname, ctype_id,
fspace, dcpl))<0) goto error;
@@ -642,7 +642,7 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval,
one, NULL)<0) goto error;
/* case for atomic datatype */
if (datatype==H5T_INTEGER) {
- if(H5Dread(dset1, H5T_NATIVE_INT, mspace, fspace, H5P_DEFAULT,
+ if(H5Dread(dset1, H5T_NATIVE_INT, mspace, fspace, H5P_DEFAULT,
&val_rd)<0) goto error;
if (fill_time!=H5D_FILL_TIME_NEVER && val_rd!=fillval) {
H5_FAILED();
@@ -659,7 +659,7 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval,
if(H5Dread(dset2, ctype_id, mspace, fspace, H5P_DEFAULT,
&rd_c)<0) goto error;
if (fill_time!=H5D_FILL_TIME_NEVER && (rd_c.a!=fill_c.a ||
- rd_c.x!=fill_c.x || rd_c.y!=fill_c.y ||
+ rd_c.x!=fill_c.x || rd_c.y!=fill_c.y ||
rd_c.z!=fill_c.z)) {
H5_FAILED();
puts(" Value read was not a fill value.");
@@ -667,7 +667,7 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval,
"Fill value: %f, %d, %f, %c\n",
hs_offset[0], hs_offset[1],
hs_offset[2], hs_offset[3],
- hs_offset[4], rd_c.a, rd_c.x, rd_c.y, rd_c.z,
+ hs_offset[4], rd_c.a, rd_c.x, rd_c.y, rd_c.z,
fill_c.a, fill_c.x, fill_c.y, fill_c.z);
goto error;
}
@@ -694,8 +694,8 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval,
for (u=0; u<nelmts; u++) buf[u] = 9999;
if (H5Dwrite(dset1, H5T_NATIVE_INT, mspace, fspace, H5P_DEFAULT,
buf)<0) goto error;
- }
- /* case for compound datatype */
+ }
+ /* case for compound datatype */
else if(datatype==H5T_COMPOUND) {
assert((nelmts*sizeof(comp_datatype))==
(hsize_t)((size_t)(nelmts*sizeof(comp_datatype))));
@@ -711,9 +711,9 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval,
}
/* Check if space is allocated */
- if (datatype==H5T_INTEGER && H5Dget_space_status(dset1, &allocation)<0)
+ if (datatype==H5T_INTEGER && H5Dget_space_status(dset1, &allocation)<0)
goto error;
- if (datatype==H5T_COMPOUND && H5Dget_space_status(dset2, &allocation)<0)
+ if (datatype==H5T_COMPOUND && H5Dget_space_status(dset2, &allocation)<0)
goto error;
if (layout == H5D_CONTIGUOUS && allocation != H5D_SPACE_STATUS_ALLOCATED) {
H5_FAILED();
@@ -765,7 +765,7 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval,
goto error;
}
} else if(fill_time == H5D_FILL_TIME_NEVER && odd) {
- /*Trash data. Don't compare*/
+ /*Trash data. Don't compare*/
}
} /* end for datatype==H5T_INTEGER */
/* case for compound datatype */
@@ -777,7 +777,7 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval,
should_be_c.a=fill_c.a;
should_be_c.x=fill_c.x;
should_be_c.y=fill_c.y;
- should_be_c.z=fill_c.z;
+ should_be_c.z=fill_c.z;
} else {
should_be_c.a=buf_c[0].a;
should_be_c.x=buf_c[0].x;
@@ -792,7 +792,7 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval,
"should be: %f,%d,%f,%c\n",
(long)hs_offset[0], (long)hs_offset[1],
(long)hs_offset[2], (long)hs_offset[3],
- (long)hs_offset[4],
+ (long)hs_offset[4],
rd_c.a, rd_c.x, rd_c.y, rd_c.z, should_be_c.a,
should_be_c.x,should_be_c.y,should_be_c.z);
goto error;
@@ -811,14 +811,14 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval,
"should be: %f,%d,%f,%c\n",
(long)hs_offset[0], (long)hs_offset[1],
(long)hs_offset[2], (long)hs_offset[3],
- (long)hs_offset[4],
+ (long)hs_offset[4],
rd_c.a, rd_c.x, rd_c.y, rd_c.z, should_be_c.a,
should_be_c.x,should_be_c.y,should_be_c.z);
goto error;
}
} /* end for fill_time == H5D_FILL_TIME_NEVER */
else if(fill_time == H5D_FILL_TIME_NEVER && odd) {
- /*Trash data. Don't compare*/
+ /*Trash data. Don't compare*/
}
} /* end for datatype==H5T_COMPOUND */
}
@@ -854,7 +854,7 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval,
* Thursday, October 1, 1998
*
* Modifications:
- * Many new cases have been added to this test since the
+ * Many new cases have been added to this test since the
* fill value design is modified.
*
*-------------------------------------------------------------------------
@@ -868,7 +868,7 @@ test_rdwr(hid_t fapl, const char *base_name, H5D_layout_t layout)
int nerrors=0;
int fillval = 0x4c70f1cd;
comp_datatype fill_ctype={0,0,0,0};
-
+
if (H5D_CHUNKED==layout) {
TESTING("chunked dataset I/O");
} else if (H5D_COMPACT==layout) {
@@ -887,7 +887,7 @@ test_rdwr(hid_t fapl, const char *base_name, H5D_layout_t layout)
} else if (H5D_COMPACT==layout) {
if (H5Pset_layout(dcpl, H5D_COMPACT)<0) goto error;
}
- if ((ctype_id=create_compound_type())<0) goto error;
+ if ((ctype_id=create_compound_type())<0) goto error;
/* I. Test H5D_ALLOC_TIME_LATE space allocation cases */
@@ -897,25 +897,25 @@ test_rdwr(hid_t fapl, const char *base_name, H5D_layout_t layout)
/* case for H5D_FILL_TIME_ALLOC as fill write time and fill value to be default */
if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0) goto error;
fillval = 0;
- nerrors += test_rdwr_cases(file, dcpl, "dset1", &fillval, H5D_FILL_TIME_ALLOC,
+ nerrors += test_rdwr_cases(file, dcpl, "dset1", &fillval, H5D_FILL_TIME_ALLOC,
layout, H5T_INTEGER, -1);
/* case for H5D_FILL_TIME_NEVER as fill write time and fill value to be default */
if (H5Pset_fill_time(dcpl, H5D_FILL_TIME_NEVER) < 0) goto error;
- nerrors += test_rdwr_cases(file, dcpl, "dset2", &fillval, H5D_FILL_TIME_NEVER,
+ nerrors += test_rdwr_cases(file, dcpl, "dset2", &fillval, H5D_FILL_TIME_NEVER,
layout, H5T_INTEGER, -1);
/* case for H5D_FILL_TIME_ALLOC as fill write time and fill value is user-defined */
if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0) goto error;
fillval = 0x4c70f1cd;
if (H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fillval)<0) goto error;
- nerrors += test_rdwr_cases(file, dcpl, "dset3", &fillval, H5D_FILL_TIME_ALLOC,
+ nerrors += test_rdwr_cases(file, dcpl, "dset3", &fillval, H5D_FILL_TIME_ALLOC,
layout, H5T_INTEGER, -1);
/* case for H5D_FILL_TIME_NEVER as fill write time and fill value is user-defined */
if (H5Pset_fill_time(dcpl, H5D_FILL_TIME_NEVER) < 0) goto error;
if (H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fillval)<0) goto error;
- nerrors += test_rdwr_cases(file, dcpl, "dset4", &fillval, H5D_FILL_TIME_NEVER,
+ nerrors += test_rdwr_cases(file, dcpl, "dset4", &fillval, H5D_FILL_TIME_NEVER,
layout, H5T_INTEGER, -1);
/* case for H5D_FILL_TIME_ALLOC as fill write time and fill value is undefined */
@@ -924,7 +924,7 @@ test_rdwr(hid_t fapl, const char *base_name, H5D_layout_t layout)
/* case for H5D_FILL_TIME_NEVER as fill write time and fill value is undefined */
if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_NEVER) < 0) goto error;
if (H5Pset_fill_value(dcpl, -1, NULL)<0) goto error;
- nerrors += test_rdwr_cases(file, dcpl, "dset5", &fillval, H5D_FILL_TIME_NEVER,
+ nerrors += test_rdwr_cases(file, dcpl, "dset5", &fillval, H5D_FILL_TIME_NEVER,
layout, H5T_INTEGER, -1);
/* case for H5D_FILL_TIME_ALLOC as fill write time and fill value is user-defined
@@ -932,7 +932,7 @@ test_rdwr(hid_t fapl, const char *base_name, H5D_layout_t layout)
if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0) goto error;
fill_ctype.y = 4444.4444;
if(H5Pset_fill_value(dcpl, ctype_id, &fill_ctype)<0) goto error;
- nerrors += test_rdwr_cases(file, dcpl, "dset11", &fill_ctype, H5D_FILL_TIME_ALLOC,
+ nerrors += test_rdwr_cases(file, dcpl, "dset11", &fill_ctype, H5D_FILL_TIME_ALLOC,
layout, H5T_COMPOUND, ctype_id);
if (H5Pclose(dcpl)<0) goto error;
@@ -949,7 +949,7 @@ test_rdwr(hid_t fapl, const char *base_name, H5D_layout_t layout)
/* case for H5D_FILL_TIME_ALLOC as fill write time and fill value to be default */
if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0) goto error;
fillval = 0;
- nerrors += test_rdwr_cases(file, dcpl, "dset6", &fillval, H5D_FILL_TIME_ALLOC,
+ nerrors += test_rdwr_cases(file, dcpl, "dset6", &fillval, H5D_FILL_TIME_ALLOC,
layout, H5T_INTEGER, -1);
/* case for H5D_FILL_TIME_NEVER as fill write time and fill value to be default */
@@ -961,13 +961,13 @@ test_rdwr(hid_t fapl, const char *base_name, H5D_layout_t layout)
if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0) goto error;
fillval = 0x4c70f1cd;
if (H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fillval)<0) goto error;
- nerrors += test_rdwr_cases(file, dcpl, "dset8", &fillval, H5D_FILL_TIME_ALLOC,
+ nerrors += test_rdwr_cases(file, dcpl, "dset8", &fillval, H5D_FILL_TIME_ALLOC,
layout, H5T_INTEGER, -1);
/* case for H5D_FILL_TIME_NEVER as fill write time and fill value is user-defined */
if (H5Pset_fill_time(dcpl, H5D_FILL_TIME_NEVER) < 0) goto error;
if (H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fillval)<0) goto error;
- nerrors += test_rdwr_cases(file, dcpl, "dset9", &fillval, H5D_FILL_TIME_NEVER,
+ nerrors += test_rdwr_cases(file, dcpl, "dset9", &fillval, H5D_FILL_TIME_NEVER,
layout, H5T_INTEGER, -1);
/* case for H5D_FILL_TIME_ALLOC as fill write time and fill value is undefined */
@@ -976,7 +976,7 @@ test_rdwr(hid_t fapl, const char *base_name, H5D_layout_t layout)
/* case for H5D_FILL_TIME_NEVER as fill write time and fill value is undefined */
if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_NEVER) < 0) goto error;
if (H5Pset_fill_value(dcpl, -1, NULL)<0) goto error;
- nerrors += test_rdwr_cases(file, dcpl, "dset10", &fillval, H5D_FILL_TIME_NEVER,
+ nerrors += test_rdwr_cases(file, dcpl, "dset10", &fillval, H5D_FILL_TIME_NEVER,
layout, H5T_INTEGER, -1);
/* case for H5D_FILL_TIME_ALLOC as fill write time and fill value is user-defined
@@ -1055,7 +1055,7 @@ test_extend(hid_t fapl, const char *base_name, H5D_layout_t layout)
#ifndef NO_FILLING
if (H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fillval)<0) goto error;
#endif
-
+
#if 1
/*
* Remove this once contiguous datasets can support extensions in other
@@ -1107,7 +1107,7 @@ test_extend(hid_t fapl, const char *base_name, H5D_layout_t layout)
goto skip;
}
#endif
-
+
/* Create a file and dataset */
h5_fixname(base_name, fapl, filename, sizeof filename);
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0)
@@ -1188,7 +1188,7 @@ test_extend(hid_t fapl, const char *base_name, H5D_layout_t layout)
if (H5Dextend(dset, max_size)<0) goto error;
if (H5Sclose(fspace)<0) goto error;
if ((fspace=H5Dget_space(dset))<0) goto error;
-
+
/* Read some data and make sure it's the right value */
if ((mspace=H5Screate_simple(5, one, NULL))<0) goto error;
for (i=0; i<1000; i++) {
@@ -1200,7 +1200,7 @@ test_extend(hid_t fapl, const char *base_name, H5D_layout_t layout)
odd += (int)(hs_offset[j]%2);
}
}
-
+
should_be = odd ? fillval : 9999;
if (H5Sselect_hyperslab(fspace, H5S_SELECT_SET, hs_offset, NULL,
one, NULL)<0) goto error;
@@ -1258,8 +1258,8 @@ test_extend(hid_t fapl, const char *base_name, H5D_layout_t layout)
*
* Failure: number of errors
*
- * Programmer: Raymond Lu
- * Feb 27, 2002
+ * Programmer: Raymond Lu
+ * Feb 27, 2002
*
* Modifications:
*
@@ -1274,19 +1274,19 @@ test_compatible(void)
hsize_t dims[2], one[2]={1,1};
hsize_t hs_offset[2]={3,4};
H5D_fill_value_t status;
- char *srcdir = getenv("srcdir"); /*where the src code is located*/
+ char *srcdir = getenv("srcdir"); /*where the src code is located*/
char testfile[512]=""; /* test file name */
- TESTING("contiguous dataset compatibility with v. 1.4");
+ TESTING("contiguous dataset compatibility with v. 1.4");
/* Generate correct name for test file by prepending the source path */
- if(srcdir && ((strlen(srcdir) + strlen(FILE_COMPATIBLE) + 1) <
+ if(srcdir && ((strlen(srcdir) + strlen(FILE_COMPATIBLE) + 1) <
sizeof(testfile))) {
strcpy(testfile, srcdir);
strcat(testfile, "/");
- }
+ }
strcat(testfile, FILE_COMPATIBLE);
-
+
if ((file=H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT))<0) {
printf(" Could not open file %s. Try set $srcdir to point at the "
"source directory of test\n", testfile);
@@ -1299,7 +1299,7 @@ test_compatible(void)
if(status != H5D_FILL_VALUE_UNDEFINED) {
H5_FAILED();
printf(" %d: Got a different fill value than what was set.",__LINE__);
- printf(" Got status=%ld, suppose to be H5D_FILL_VALUE_UNDEFINED\n",
+ printf(" Got status=%ld, suppose to be H5D_FILL_VALUE_UNDEFINED\n",
(long)status);
goto error;
}
@@ -1314,7 +1314,7 @@ test_compatible(void)
if((mspace=H5Screate_simple(2, one, NULL))<0) goto error;
if(H5Sselect_hyperslab(fspace, H5S_SELECT_SET, hs_offset, NULL, one, NULL)<0)
goto error;
- if(H5Dread(dset1, H5T_NATIVE_INT, mspace, fspace, H5P_DEFAULT, &val_rd)<0)
+ if(H5Dread(dset1, H5T_NATIVE_INT, mspace, fspace, H5P_DEFAULT, &val_rd)<0)
goto error;
if (val_rd != 0) {
H5_FAILED();
@@ -1358,7 +1358,7 @@ test_compatible(void)
if((mspace=H5Screate_simple(2, one, NULL))<0) goto error;
if(H5Sselect_hyperslab(fspace, H5S_SELECT_SET, hs_offset, NULL, one, NULL)<0)
goto error;
- if(H5Dread(dset2, H5T_NATIVE_INT, mspace, fspace, H5P_DEFAULT, &val_rd)<0)
+ if(H5Dread(dset2, H5T_NATIVE_INT, mspace, fspace, H5P_DEFAULT, &val_rd)<0)
goto error;
if (val_rd != fill_val) {
H5_FAILED();
@@ -1370,7 +1370,7 @@ test_compatible(void)
if(H5Sclose(fspace)<0) goto error;
if(H5Sclose(mspace)<0) goto error;
if(H5Dclose(dset2)<0) goto error;
-
+
if(H5Fclose(file)<0) goto error;
PASSED();
return 0;
@@ -1388,16 +1388,16 @@ error:
} H5E_END_TRY;
return 1;
}
-
+
/*-------------------------------------------------------------------------
* Function: main
*
* Purpose: Tests fill values
*
- * Return: Success:
+ * Return: Success:
*
- * Failure:
+ * Failure:
*
* Programmer: Robb Matzke
* Thursday, October 1, 1998
@@ -1447,7 +1447,7 @@ main(int argc, char *argv[])
nerrors += test_extend(fapl, FILENAME[5], H5D_CONTIGUOUS);
nerrors += test_compatible();
}
-
+
/* Compact dataset storage tests */
if (test_compact) {
nerrors += test_create(fapl, FILENAME[6], H5D_COMPACT);
diff --git a/test/flush1.c b/test/flush1.c
index caed565..b5eb6a1 100644
--- a/test/flush1.c
+++ b/test/flush1.c
@@ -65,7 +65,7 @@ main(void)
/* Create the file */
h5_fixname(FILENAME[0], fapl, name, sizeof name);
if ((file=H5Fcreate(name, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) goto error;
-
+
/* Create a chunked dataset */
if ((dcpl=H5Pcreate(H5P_DATASET_CREATE))<0) goto error;
if (H5Pset_chunk(dcpl, 2, ch_size)<0) goto error;
diff --git a/test/flush2.c b/test/flush2.c
index a312e50..9fb42b4 100644
--- a/test/flush2.c
+++ b/test/flush2.c
@@ -63,7 +63,7 @@ main(void)
/* Open the file */
h5_fixname(FILENAME[0], fapl, name, sizeof name);
if ((file=H5Fopen(name, H5F_ACC_RDONLY, fapl))<0) goto error;
-
+
/* Open the dataset */
if ((dset=H5Dopen(file, "dset"))<0) goto error;
if ((space=H5Dget_space(dset))<0) goto error;
@@ -111,6 +111,6 @@ main(void)
return 1;
}
-
-
-
+
+
+
diff --git a/test/gen_deflate.c b/test/gen_deflate.c
index 519e907..7154c84 100644
--- a/test/gen_deflate.c
+++ b/test/gen_deflate.c
@@ -40,11 +40,11 @@ int data[SPACE_DIM1][SPACE_DIM2];
/*-------------------------------------------------------------------------
* Function: main
*
- * Purpose:
+ * Purpose:
*
- * Return: Success:
+ * Return: Success:
*
- * Failure:
+ * Failure:
*
* Programmer: Quincey Koziol
* Thursday, November 14, 2002
diff --git a/test/gen_filters.c b/test/gen_filters.c
index dd4f369..b1e9e38 100644
--- a/test/gen_filters.c
+++ b/test/gen_filters.c
@@ -31,19 +31,19 @@ test_filters_endianess(void)
{
hid_t fid; /* file ID */
hid_t dsid; /* dataset ID */
- hid_t sid; /* dataspace ID */
+ hid_t sid; /* dataspace ID */
hid_t dcpl; /* dataset creation property list ID */
hsize_t dims[1]={20}; /* dataspace dimensions */
hsize_t chunk_dims[1]={10}; /* chunk dimensions */
int buf[20];
int rank=1;
int i;
-
+
for (i=0; i<20; i++){
buf[i]=1;
}
-
-#if defined H5_HAVE_FILTER_FLETCHER32
+
+#if defined H5_HAVE_FILTER_FLETCHER32
/* create a file using default properties */
fid=H5Fcreate(TESTFILE,H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT);
@@ -89,7 +89,7 @@ error:
*
* Purpose: call the generator function
*
- * Return: Success:
+ * Return: Success:
*
* Modifications:
*
diff --git a/test/gen_new_array.c b/test/gen_new_array.c
index af310cb..82237e4 100644
--- a/test/gen_new_array.c
+++ b/test/gen_new_array.c
@@ -44,11 +44,11 @@
/*-------------------------------------------------------------------------
* Function: main
*
- * Purpose:
+ * Purpose:
*
- * Return: Success:
+ * Return: Success:
*
- * Failure:
+ * Failure:
*
* Programmer: Robb Matzke
* Monday, October 26, 1998
diff --git a/test/gen_new_fill.c b/test/gen_new_fill.c
index 08c0882..0615504 100644
--- a/test/gen_new_fill.c
+++ b/test/gen_new_fill.c
@@ -14,15 +14,15 @@
/*
* Programmer: Raymond Lu <slu@ncsa.uiuc.edu>
- * Feb 27, 2002
+ * Feb 27, 2002
*
* Purpose: This program is run to generate a HDF5 data file with fill
* value property. A new fill value design has been put into
* library v1.5. To test compatibility between v1.4 and v1.5,
* compile and run this program, it will generate a file called
- * fill_new.h5. You need to move it to the /test directory
+ * fill_new.h5. You need to move it to the /test directory
* in HDF5 v1.4 source codes. The fillval.c program will read it.
- *
+ *
*/
#include "h5test.h"
@@ -46,16 +46,16 @@ int main()
if(H5Pset_fill_time(dcpl, H5D_ALLOC) < 0) goto error;
if(H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fill_val1)<0) goto error;
if((dset1 = H5Dcreate(file, "dset1", H5T_NATIVE_INT, space, dcpl))<0)
- goto error;
+ goto error;
if (H5Dget_space_status(dset1, &allocation)<0) goto error;
if (allocation == H5D_SPACE_STATUS_NOT_ALLOCATED) {
puts(" Got unallocated space instead of allocated.");
printf(" Got %d\n", allocation);
goto error;
}
- if(H5Dclose(dset1)<0) goto error;
+ if(H5Dclose(dset1)<0) goto error;
- /* Create a dataset with space allocation being delayed */
+ /* Create a dataset with space allocation being delayed */
if(H5Pset_space_time(dcpl, H5D_LATE) < 0) goto error;
if(H5Pset_fill_time(dcpl, H5D_ALLOC) < 0) goto error;
if(H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fill_val2)<0) goto error;
diff --git a/test/gen_new_mtime.c b/test/gen_new_mtime.c
index 3e1a891..4445834 100644
--- a/test/gen_new_mtime.c
+++ b/test/gen_new_mtime.c
@@ -33,11 +33,11 @@
/*-------------------------------------------------------------------------
* Function: main
*
- * Purpose:
+ * Purpose:
*
- * Return: Success:
+ * Return: Success:
*
- * Failure:
+ * Failure:
*
* Programmer: Quincey Koziol
* Friday, January 3, 2003
diff --git a/test/gen_new_super.c b/test/gen_new_super.c
index b8de65c..4115e9b 100644
--- a/test/gen_new_super.c
+++ b/test/gen_new_super.c
@@ -36,8 +36,8 @@
*
* Purpose: Create a file with a new version (>0) of the superblock
*
- * Return: Success:
- * Failure:
+ * Return: Success:
+ * Failure:
*
* Programmer: Quincey Koziol
* Tuesday, July 15, 2003
diff --git a/test/gen_nullspace.c b/test/gen_nullspace.c
index 5892443..fd73f24 100644
--- a/test/gen_nullspace.c
+++ b/test/gen_nullspace.c
@@ -41,18 +41,18 @@ main(void)
hid_t did; /* Dataset ID */
hid_t attr; /* Attribute ID */
herr_t ret; /* Generic return value */
-
+
/* Create the file */
fid = H5Fcreate(NULLFILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
assert(fid>0);
sid = H5Screate(H5S_NULL);
assert(sid>0);
-
+
/* Create dataset */
did = H5Dcreate(fid, NULLDATASET, H5T_NATIVE_UINT, sid, H5P_DEFAULT);
assert(did>0);
-
+
/* Close the dataset */
ret = H5Dclose(did);
assert(ret>=0);
@@ -64,23 +64,23 @@ main(void)
/* Create an attribute for the group */
attr=H5Acreate(gid,NULLATTR,H5T_NATIVE_INT,sid,H5P_DEFAULT);
assert(attr>0);
-
+
/* Close attribute */
ret=H5Aclose(attr);
assert(ret>=0);
-
+
/* Close the group */
ret = H5Gclose(gid);
assert(ret>=0);
-
+
/* Close the dataspace */
ret = H5Sclose(sid);
assert(ret>=0);
-
+
/* Close the file */
ret = H5Fclose(fid);
assert(ret>=0);
-
+
return 0;
}
diff --git a/test/gen_old_array.c b/test/gen_old_array.c
index 69206b1..0879c13 100644
--- a/test/gen_old_array.c
+++ b/test/gen_old_array.c
@@ -43,11 +43,11 @@
/*-------------------------------------------------------------------------
* Function: main
*
- * Purpose:
+ * Purpose:
*
- * Return: Success:
+ * Return: Success:
*
- * Failure:
+ * Failure:
*
* Programmer: Robb Matzke
* Monday, October 26, 1998
diff --git a/test/gen_old_layout.c b/test/gen_old_layout.c
index 46bbdaf..ddc3d35 100644
--- a/test/gen_old_layout.c
+++ b/test/gen_old_layout.c
@@ -39,11 +39,11 @@
/*-------------------------------------------------------------------------
* Function: main
*
- * Purpose:
+ * Purpose:
*
- * Return: Success:
+ * Return: Success:
*
- * Failure:
+ * Failure:
*
* Programmer: Quincey Koziol
* Friday, January 3, 2003
diff --git a/test/gen_old_mtime.c b/test/gen_old_mtime.c
index 9a52693..daaf78f 100644
--- a/test/gen_old_mtime.c
+++ b/test/gen_old_mtime.c
@@ -33,11 +33,11 @@
/*-------------------------------------------------------------------------
* Function: main
*
- * Purpose:
+ * Purpose:
*
- * Return: Success:
+ * Return: Success:
*
- * Failure:
+ * Failure:
*
* Programmer: Quincey Koziol
* Friday, January 3, 2003
diff --git a/test/getname.c b/test/getname.c
index 4371018..5ee2139 100644
--- a/test/getname.c
+++ b/test/getname.c
@@ -48,7 +48,7 @@ static int check_name( char *name, const char* check )
int ret = HDstrcmp( name, check );
HDstrcpy( name, "" );
return ret;
-
+
}
#define NAME_BUF_SIZE 40
@@ -64,7 +64,7 @@ int main( void )
hid_t file_id, file1_id, file2_id, file3_id;
hid_t group_id, group2_id, group3_id, group4_id, group5_id, group6_id, group7_id;
hid_t dataset_id, dataset2_id;
- hid_t space_id;
+ hid_t space_id;
hid_t type_id, type2_id;
hsize_t dims[1] = { 5 };
@@ -89,7 +89,7 @@ int main( void )
h5_fixname(FILENAME[1], fapl, filename1, sizeof filename1);
h5_fixname(FILENAME[2], fapl, filename2, sizeof filename2);
h5_fixname(FILENAME[3], fapl, filename3, sizeof filename3);
-
+
/* Create a new file_id using default properties. */
if ((file_id = H5Fcreate( filename0, H5F_ACC_TRUNC, H5P_DEFAULT, fapl ))<0) goto out;
@@ -106,7 +106,7 @@ int main( void )
/* Get name */
if (H5Iget_name( group_id, name, size )<0) goto out;
-
+
/* Verify */
if (check_name( name, "/g0" )!=0) goto out;
@@ -132,18 +132,18 @@ int main( void )
/* Get name */
if (H5Iget_name( group_id, name, size )<0) goto out;
-
+
/* Verify */
if (check_name( name, "/g1" )!=0)
goto out;
/* Get name */
if (H5Iget_name( group2_id, name, size )<0) goto out;
-
+
/* Verify */
if (check_name( name, "/g1/g2" )!=0)
goto out;
-
+
/* Close */
H5Gclose( group_id );
H5Gclose( group2_id );
@@ -154,7 +154,7 @@ int main( void )
/*-------------------------------------------------------------------------
* Test H5Iget_name with H5Gopen
*-------------------------------------------------------------------------
- */
+ */
TESTING("H5Iget_name with H5Gopen");
@@ -170,14 +170,14 @@ int main( void )
/* Verify */
if (check_name( name, "/g1" )!=0)
goto out;
-
+
/* Get name */
if (H5Iget_name( group2_id, name, size )<0) goto out;
/* Verify */
if (check_name( name, "/g1/g2" )!=0)
goto out;
-
+
/* Close */
H5Gclose( group_id );
H5Gclose( group2_id );
@@ -193,12 +193,12 @@ int main( void )
*/
TESTING("H5Iget_name with H5Dcreate");
-
+
/* Create the data space */
if ((space_id = H5Screate_simple( 1, dims, NULL ))<0) goto out;
/* Create a new dataset */
- if ((dataset_id = H5Dcreate( file_id , "d1", H5T_NATIVE_INT, space_id,
+ if ((dataset_id = H5Dcreate( file_id , "d1", H5T_NATIVE_INT, space_id,
H5P_DEFAULT ))<0) goto out;
/* Get name */
@@ -207,27 +207,27 @@ int main( void )
/* Verify */
if (check_name( name, "/d1" )!=0)
goto out;
-
+
/* Close */
- H5Dclose( dataset_id );
+ H5Dclose( dataset_id );
/* Reopen the group */
if ((group_id = H5Gopen( file_id, "g1" ))<0) goto out;
/* Create a new dataset inside "g1" */
- if ((dataset_id = H5Dcreate( group_id , "d1", H5T_NATIVE_INT, space_id,
+ if ((dataset_id = H5Dcreate( group_id , "d1", H5T_NATIVE_INT, space_id,
H5P_DEFAULT ))<0) goto out;
-
+
/* Get name */
if (H5Iget_name( dataset_id, name, size )<0) goto out;
/* Verify */
if (check_name( name, "/g1/d1" )!=0)
goto out;
-
+
/* Close */
H5Gclose( group_id );
- H5Dclose( dataset_id );
+ H5Dclose( dataset_id );
H5Sclose( space_id );
PASSED();
@@ -252,7 +252,7 @@ int main( void )
goto out;
/* Close */
- H5Dclose( dataset_id );
+ H5Dclose( dataset_id );
/* Reopen the group */
@@ -269,7 +269,7 @@ int main( void )
goto out;
/* Close */
- H5Dclose( dataset_id );
+ H5Dclose( dataset_id );
H5Gclose( group_id );
PASSED();
@@ -287,14 +287,14 @@ int main( void )
if ((group_id = H5Gcreate( file_id, "g2", 0 ))<0) goto out;
if ((group2_id = H5Gcreate( file_id, "g2/bar", 0 ))<0) goto out;
if ((group3_id = H5Gcreate( file_id, "g2/bar/baz", 0 ))<0) goto out;
-
+
/* Create a dataset */
if ((space_id = H5Screate_simple( 1, dims, NULL ))<0) goto out;
- if ((dataset_id = H5Dcreate( group3_id , "d1", H5T_NATIVE_INT, space_id,
+ if ((dataset_id = H5Dcreate( group3_id , "d1", H5T_NATIVE_INT, space_id,
H5P_DEFAULT ))<0) goto out;
-
+
/* Close */
- H5Dclose( dataset_id );
+ H5Dclose( dataset_id );
H5Sclose( space_id );
H5Gclose( group_id );
H5Gclose( group2_id );
@@ -330,10 +330,10 @@ int main( void )
if (H5Tinsert (type_id, "a", HOFFSET(s1_t,a), H5T_NATIVE_INT)<0) goto out;
if (H5Tinsert (type_id, "b", HOFFSET(s1_t,b), H5T_NATIVE_INT)<0) goto out;
if (H5Tinsert (type_id, "c", HOFFSET(s1_t,c), H5T_NATIVE_FLOAT)<0) goto out;
-
+
/* Save datatype for later */
if (H5Tcommit (file_id, "t1", type_id)<0) goto out;
-
+
/* Get name */
if (H5Iget_name( type_id, name, size )<0) goto out;
@@ -347,7 +347,7 @@ int main( void )
PASSED();
/*-------------------------------------------------------------------------
- * Test H5Iget_name with H5Topen
+ * Test H5Iget_name with H5Topen
*-------------------------------------------------------------------------
*/
@@ -355,7 +355,7 @@ int main( void )
/* Open the named datatype */
if((type_id=H5Topen(file_id, "t1"))<0) goto out;
-
+
/* Get name */
if (H5Iget_name( type_id, name, size )<0) goto out;
@@ -389,7 +389,7 @@ int main( void )
/* Verify */
if (check_name( name, "/g1a" )!=0) goto out;
-
+
/* Close */
H5Gclose( group_id );
@@ -419,7 +419,7 @@ int main( void )
goto out;
/* Close */
- H5Dclose( dataset_id );
+ H5Dclose( dataset_id );
PASSED();
@@ -438,7 +438,7 @@ int main( void )
/* Rename datatype */
if (H5Gmove( file_id, "/t1", "/t1a" )<0) goto out;
-
+
/* Get name */
if (H5Iget_name( type_id, name, size )<0) goto out;
@@ -460,7 +460,7 @@ int main( void )
TESTING("H5Iget_name with H5Gmove and relative names");
/* Create group "/g3" */
- if ((group_id = H5Gcreate( file_id, "/g3", 0 ))<0) goto out;
+ if ((group_id = H5Gcreate( file_id, "/g3", 0 ))<0) goto out;
/* Create group "/g3/foo" using absolute name */
if ((group2_id = H5Gcreate( file_id, "/g3/foo1", 0 ))<0) goto out;
@@ -473,7 +473,7 @@ int main( void )
/* Get name */
if (H5Iget_name( group_id, name, size )<0) goto out;
-
+
/* Verify */
if (check_name( name, "/g3" )!=0) goto out;
@@ -494,7 +494,7 @@ int main( void )
/* Get name */
if (H5Iget_name( group_id, name, size )<0) goto out;
-
+
/* Verify */
if (check_name( name, "/g3" )!=0) goto out;
@@ -515,7 +515,7 @@ int main( void )
H5Gclose( group2_id );
H5Gclose( group3_id );
-
+
PASSED();
@@ -548,7 +548,7 @@ int main( void )
/* Get name */
if (H5Iget_name( group3_id, name, size )<0) goto out;
-
+
/* Verify */
if (check_name( name, "/g5/C/D" )!=0) goto out;
@@ -611,16 +611,16 @@ int main( void )
/* Get name */
if (H5Iget_name( group2_id, name, size )<0) goto out;
-
+
/* Verify */
if (check_name( name, "/g7/C" )!=0) goto out;
-
+
/* Get name */
if (H5Iget_name( group3_id, name, size )<0) goto out;
-
+
/* Verify */
if (check_name( name, "/g7/C/B" )!=0) goto out;
-
+
/* Close */
H5Gclose( group_id );
H5Gclose( group2_id );
@@ -630,7 +630,7 @@ int main( void )
PASSED();
/*-------------------------------------------------------------------------
- * Test H5Iget_name with H5Gunlink
+ * Test H5Iget_name with H5Gunlink
*-------------------------------------------------------------------------
*/
@@ -641,7 +641,7 @@ int main( void )
/* Delete */
if (H5Gunlink( file_id, "/g8")<0) goto out;
-
+
/* Get name */
if (H5Iget_name( group_id, name, size )<0) goto out;
@@ -759,7 +759,7 @@ int main( void )
/* Create group "g11/g" */
if ((group_id = H5Gcreate( file_id, "g11", 0 ))<0) goto out;
if ((group2_id = H5Gcreate( file_id, "g11/g", 0 ))<0) goto out;
-
+
/* Create two datasets "g11/d" and "g11/g/d"*/
if ((space_id = H5Screate_simple( 1, dims, NULL ))<0) goto out;
if ((dataset_id = H5Dcreate( group_id , "d", H5T_NATIVE_INT, space_id, H5P_DEFAULT ))<0) goto out;
@@ -779,9 +779,9 @@ int main( void )
/* Verify */
if (check_name( name, "/g11/g/d" )!=0) goto out;
-
+
/* Close */
- H5Dclose( dataset_id );
+ H5Dclose( dataset_id );
H5Dclose( dataset2_id );
H5Sclose( space_id );
H5Gclose( group_id );
@@ -799,7 +799,7 @@ int main( void )
/* Create a group "g12" in the first file */
if ((group_id = H5Gcreate( file_id, "/g12", 0 ))<0) goto out;
-
+
/* Close */
H5Gclose( group_id );
@@ -808,7 +808,7 @@ int main( void )
/* Create a data space */
if ((space_id = H5Screate_simple( 1, dims, NULL ))<0) goto out;
-
+
/* Create the dataset */
if ((dataset_id = H5Dcreate( file1_id , "d", H5T_NATIVE_INT, space_id, H5P_DEFAULT ))<0) goto out;
@@ -826,7 +826,7 @@ int main( void )
/* Verify */
if (check_name( name, "/g12/d" )!=0) goto out;
-
+
if (H5Funmount(file_id, "/g12")<0) goto out;
/* Close */
@@ -849,7 +849,7 @@ int main( void )
if ((group_id = H5Gcreate( file_id, "/g13", 0 ))<0) goto out;
if ((group2_id = H5Gcreate( file_id, "/g13/g1", 0 ))<0) goto out;
if ((group3_id = H5Gcreate( file_id, "/g13/g1/g2", 0 ))<0) goto out;
-
+
/* Close */
H5Gclose( group_id );
H5Gclose( group2_id );
@@ -1066,7 +1066,7 @@ int main( void )
/*-------------------------------------------------------------------------
- * Test H5Iget_name with H5Funmount
+ * Test H5Iget_name with H5Funmount
*-------------------------------------------------------------------------
*/
@@ -1077,7 +1077,7 @@ int main( void )
if ((group2_id = H5Gcreate( file_id, "/g15/g1", 0 ))<0) goto out;
if ((group3_id = H5Gcreate( file_id, "/g15/g1/g2", 0 ))<0) goto out;
if ((group4_id = H5Gcreate( file_id, "/g15/g1/g2/g3", 0 ))<0) goto out;
-
+
/* Close */
H5Gclose( group_id );
H5Gclose( group2_id );
@@ -1098,13 +1098,13 @@ int main( void )
/* Access group in the first file */
if ((group_id = H5Gopen( file_id, "/g15/g1/g2/g3"))<0) goto out;
-
+
/* Mount second file under "/g13/g1" in the first file */
if (H5Fmount(file_id, "/g15/g1", file1_id, H5P_DEFAULT)<0) goto out;
/* Access group in the second file */
if ((group2_id = H5Gopen( file_id, "/g15/g1/g16/g4/g5"))<0) goto out;
-
+
/* Get name */
if (H5Iget_name( group_id, name, size )< 0) goto out;
@@ -1161,7 +1161,7 @@ int main( void )
/* Create group "g17" */
if ((group_id = H5Gcreate( file_id, "g17", 0 ))<0) goto out;
-
+
/* Save datatype for later */
if (H5Tcommit (group_id, "t", type_id)<0) goto out;
@@ -1169,18 +1169,18 @@ int main( void )
if ((space_id = H5Screate_simple( 1, dims, NULL ))<0) goto out;
/* Create a new dataset */
- if ((dataset_id = H5Dcreate( group_id , "d", type_id, space_id,
+ if ((dataset_id = H5Dcreate( group_id , "d", type_id, space_id,
H5P_DEFAULT ))<0) goto out;
-
+
/* Close */
- H5Dclose( dataset_id );
+ H5Dclose( dataset_id );
H5Tclose( type_id );
H5Sclose( space_id );
H5Gclose( group_id );
/* Open the named datatype */
if((type_id=H5Topen(file_id, "/g17/t"))<0) goto out;
-
+
/* Get name */
if (H5Iget_name( type_id, name, size )<0) goto out;
@@ -1243,7 +1243,7 @@ PASSED();
*/
TESTING("H5Iget_name with different files");
-
+
/* Create a new file using default properties. */
if ((file2_id = H5Fcreate( filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl ))<0) goto out;
@@ -1261,7 +1261,7 @@ PASSED();
/* Delete */
if (H5Gunlink( file2_id, "/d")<0) goto out;
-
+
/* Get name */
if (H5Iget_name( dataset_id, name, size )<0) goto out;
@@ -1273,14 +1273,14 @@ PASSED();
/* Verify */
if (check_name( name, "/d" )!=0) goto out;
-
+
/* Close */
- H5Dclose( dataset_id );
- H5Dclose( dataset2_id );
+ H5Dclose( dataset_id );
+ H5Dclose( dataset2_id );
H5Sclose( space_id );
H5Fclose( file2_id );
H5Fclose( file3_id );
-
+
PASSED();
@@ -1290,7 +1290,7 @@ PASSED();
*/
TESTING("H5Iget_name with different files #2");
-
+
/* Create a new file using default properties. */
if ((file2_id = H5Fcreate( filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl ))<0) goto out;
@@ -1308,7 +1308,7 @@ PASSED();
/* Delete */
if (H5Gunlink( file3_id, "/d")<0) goto out;
-
+
/* Get name */
if (H5Iget_name( dataset_id, name, size )<0) goto out;
@@ -1320,20 +1320,20 @@ PASSED();
/* Verify */
if (check_name( name, "" )!=0) goto out;
-
+
/* Close */
- H5Dclose( dataset_id );
- H5Dclose( dataset2_id );
+ H5Dclose( dataset_id );
+ H5Dclose( dataset2_id );
H5Sclose( space_id );
H5Fclose( file2_id );
H5Fclose( file3_id );
-
+
PASSED();
/*-------------------------------------------------------------------------
* Test H5Iget_name with a small buffer for name
*-------------------------------------------------------------------------
- */
+ */
TESTING("H5Iget_name with a small buffer for name");
@@ -1349,7 +1349,7 @@ PASSED();
/* Verify */
if (check_name( name, "/g17" )!=0) goto out;
-
+
/* Close */
H5Gclose( group_id );
@@ -1359,7 +1359,7 @@ PASSED();
/*-------------------------------------------------------------------------
* Test H5Iget_name with a dynamic buffer for name
*-------------------------------------------------------------------------
- */
+ */
TESTING("H5Iget_name with a dynamic buffer for name");
@@ -1371,7 +1371,7 @@ PASSED();
/* Include the extra null character */
name3 = malloc(name_len+1);
-
+
/* Get name */
if (H5Iget_name( group_id, name3, name_len+1 )<0) goto out;
@@ -1388,7 +1388,7 @@ PASSED();
if ( name3 )
free(name3);
-
+
/* Close */
H5Gclose( group_id );
@@ -1402,7 +1402,7 @@ PASSED();
TESTING("H5Iget_name with invalid IDs");
-
+
/* Create a data space */
if ((space_id = H5Screate_simple( 1, dims, NULL ))<0) goto out;
@@ -1410,7 +1410,7 @@ PASSED();
if ((type_id = H5Tcopy(H5T_NATIVE_INT))<0) goto out;
/* Create a new dataset */
- if ((dataset_id = H5Dcreate( file_id , "d2", type_id, space_id,
+ if ((dataset_id = H5Dcreate( file_id , "d2", type_id, space_id,
H5P_DEFAULT ))<0) goto out;
/* Get name for non commited datatype, it should fail */
@@ -1420,7 +1420,7 @@ PASSED();
if (H5Iget_name( space_id, name, size ) >0) goto out;
/* Close */
- H5Dclose( dataset_id );
+ H5Dclose( dataset_id );
H5Sclose( space_id );
H5Tclose( type_id );
@@ -1437,11 +1437,11 @@ PASSED();
/* Create a group "g18/g2" in the first file */
if ((group_id = H5Gcreate( file_id, "/g18", 0 ))<0) goto out;
if ((group2_id = H5Gcreate( file_id, "/g18/g2", 0 ))<0) goto out;
-
+
/* Also create a dataset and a datatype */
if ((space_id = H5Screate_simple( 1, dims, NULL ))<0) goto out;
if ((type_id = H5Tcopy(H5T_NATIVE_INT))<0) goto out;
- if ((dataset_id = H5Dcreate( file_id, "g18/d2", type_id, space_id,
+ if ((dataset_id = H5Dcreate( file_id, "g18/d2", type_id, space_id,
H5P_DEFAULT ))<0) goto out;
if (H5Tcommit(file_id, "g18/t2", type_id) <0) goto out;
@@ -1528,7 +1528,7 @@ PASSED();
H5Fclose( file1_id );
PASSED();
-
+
/*-------------------------------------------------------------------------
* Test H5Iget_name with H5Fclose
@@ -1536,7 +1536,7 @@ PASSED();
*/
TESTING("H5Iget_name with H5Fclose");
-
+
/* Create a file and group "/g1/g2" in it */
file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
if ((group_id = H5Gcreate( file1_id, "/g1", 0 ))<0) goto out;
@@ -1562,7 +1562,7 @@ PASSED();
/* Close */
H5Gclose( group_id );
H5Gclose( group2_id );
-
+
PASSED();
@@ -1577,7 +1577,7 @@ PASSED();
file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
if ((group_id = H5Gcreate( file1_id, "/g1", 0 ))<0) goto out;
if ((group2_id = H5Gcreate( file1_id, "/g1/g2", 0 ))<0) goto out;
-
+
/* Create a new file and group "/g3/g4" in it */
if ((file2_id = H5Fcreate( filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl ))<0) goto out;
if ((group3_id = H5Gcreate( file2_id, "/g3", 0 ))<0) goto out;
@@ -1585,7 +1585,7 @@ PASSED();
/* Mount first file at "/g3/g4" in the second file */
if(H5Fmount(file2_id, "/g3/g4", file1_id, H5P_DEFAULT)<0) goto out;
-
+
/* Open the mounted group */
if ((group5_id = H5Gopen( file2_id, "/g3/g4/g1/g2" ))<0) goto out;
@@ -1597,7 +1597,7 @@ PASSED();
/* Delete */
if (H5Gunlink( file1_id, "/g3/g4/g1/g2")<0) goto out;
-
+
/* Get name */
if (H5Iget_name( group5_id, name, size )<0) goto out;
@@ -1609,7 +1609,7 @@ PASSED();
/* Verify */
if (check_name( name, "" )!=0) goto out;
-
+
/* Close */
H5Gclose( group_id );
H5Gclose( group2_id );
@@ -1618,7 +1618,7 @@ PASSED();
H5Gclose( group5_id );
H5Fclose( file1_id );
H5Fclose( file2_id );
-
+
PASSED();
@@ -1634,7 +1634,7 @@ PASSED();
file1_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
if ((group_id = H5Gcreate( file1_id, "/g1", 0 ))<0) goto out;
if ((group2_id = H5Gcreate( file1_id, "/g1/g2", 0 ))<0) goto out;
-
+
/* Create a new file and group "/g3/g4" in it */
if ((file2_id = H5Fcreate( filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl ))<0) goto out;
if ((group3_id = H5Gcreate( file2_id, "/g3", 0 ))<0) goto out;
@@ -1642,7 +1642,7 @@ PASSED();
/* Mount first file at "g3/g4" in the second file */
if(H5Fmount(file2_id, "/g3/g4", file1_id, H5P_DEFAULT)<0) goto out;
-
+
/* Get name */
if (H5Iget_name( group4_id, name, size )<0) goto out;
@@ -1669,7 +1669,7 @@ PASSED();
/* Rename group */
if (H5Gmove( file2_id, "/g3/g4/g1/g2", "/g3/g4/g1/g5" )<0) goto out;
-
+
/* Get name */
if (H5Iget_name( group5_id, name, size )<0) goto out;
@@ -1681,10 +1681,10 @@ PASSED();
/* Verify */
if (check_name( name, "/g1/g5" )!=0) goto out;
-
+
/* Rename group */
if (H5Gmove( file2_id, "/g3/g4/g1", "/g3/g4/g1a" )<0) goto out;
-
+
/* Get name */
if (H5Iget_name( group5_id, name, size )<0) goto out;
@@ -1696,22 +1696,22 @@ PASSED();
/* Verify */
if (check_name( name, "/g1a/g5" )!=0) goto out;
-
+
/* Get name */
if (H5Iget_name( group6_id, name, size )<0) goto out;
/* Verify */
if (check_name( name, "/g3/g4/g1a" )!=0) goto out;
-
+
/* Get name */
if (H5Iget_name( group_id, name, size )<0) goto out;
/* Verify */
if (check_name( name, "/g1a" )!=0) goto out;
-
+
/* Rename middle group back, using relative path */
if (H5Gmove( group3_id, "g4/g1a", "g4/g1" )<0) goto out;
-
+
/* Get name */
if (H5Iget_name( group5_id, name, size )<0) goto out;
@@ -1723,22 +1723,22 @@ PASSED();
/* Verify */
if (check_name( name, "/g1/g5" )!=0) goto out;
-
+
/* Get name */
if (H5Iget_name( group6_id, name, size )<0) goto out;
/* Verify */
if (check_name( name, "/g3/g4/g1" )!=0) goto out;
-
+
/* Get name */
if (H5Iget_name( group_id, name, size )<0) goto out;
/* Verify */
if (check_name( name, "/g1" )!=0) goto out;
-
+
/* Rename end group back, using relative path */
if (H5Gmove( group3_id, "g4/g1/g5", "g4/g1/g2" )<0) goto out;
-
+
/* Get name */
if (H5Iget_name( group5_id, name, size )<0) goto out;
@@ -1750,19 +1750,19 @@ PASSED();
/* Verify */
if (check_name( name, "/g1/g2" )!=0) goto out;
-
+
/* Get name */
if (H5Iget_name( group6_id, name, size )<0) goto out;
/* Verify */
if (check_name( name, "/g3/g4/g1" )!=0) goto out;
-
+
/* Get name */
if (H5Iget_name( group_id, name, size )<0) goto out;
/* Verify */
if (check_name( name, "/g1" )!=0) goto out;
-
+
/* Close */
H5Gclose( group_id );
H5Gclose( group2_id );
@@ -1772,9 +1772,9 @@ PASSED();
H5Gclose( group6_id );
H5Fclose( file1_id );
H5Fclose( file2_id );
-
+
PASSED();
-
+
/*-------------------------------------------------------------------------
* Test H5Iget_name with H5Glink hard
*-------------------------------------------------------------------------
@@ -1910,7 +1910,7 @@ PASSED();
H5Gclose( group_id );
H5Gclose( group2_id );
H5Gclose( group3_id );
-
+
PASSED();
@@ -1948,7 +1948,7 @@ PASSED();
H5Gclose( group_id );
H5Gclose( group2_id );
H5Gclose( group3_id );
-
+
PASSED();
@@ -1994,7 +1994,7 @@ PASSED();
H5Gclose( group_id );
H5Gclose( group2_id );
H5Gclose( group3_id );
-
+
PASSED();
@@ -2055,7 +2055,7 @@ PASSED();
H5Gclose( group_id );
H5Gclose( group2_id );
H5Gclose( group3_id );
-
+
PASSED();
@@ -2096,7 +2096,7 @@ PASSED();
H5Gclose( group_id );
H5Gclose( group2_id );
H5Gclose( group3_id );
-
+
PASSED();
/*-------------------------------------------------------------------------
@@ -2135,9 +2135,9 @@ PASSED();
H5Gclose( group_id );
H5Gclose( group2_id );
H5Gclose( group3_id );
-
+
PASSED();
-
+
/*-------------------------------------------------------------------------
* Test H5Iget_name with several nested mounted files
*-------------------------------------------------------------------------
@@ -2149,7 +2149,7 @@ PASSED();
if ((group_id = H5Gcreate( file_id, "/g25", 0 ))<0) goto out;
if ((group2_id = H5Gcreate( file_id, "/g25/g1", 0 ))<0) goto out;
if ((group3_id = H5Gcreate( file_id, "/g25/g1/g2", 0 ))<0) goto out;
-
+
/* Close */
H5Gclose( group_id );
H5Gclose( group2_id );
@@ -2344,7 +2344,7 @@ PASSED();
if ((group3_id = H5Gcreate( file_id, "/g29/g1/g2", 0 ))<0) goto out;
if ((group4_id = H5Gcreate( file_id, "/g29/g1/g2/g1", 0 ))<0) goto out;
if ((group5_id = H5Gcreate( file_id, "/g29/g1/g2/g1/g2", 0 ))<0) goto out;
-
+
/* Rename group */
if (H5Gmove( file_id, "/g29/g1/g2/g1/g2", "/g29/g1/g2/g1/g3" )<0) goto out;
@@ -2405,7 +2405,7 @@ PASSED();
if ((group_id = H5Gcreate( file_id, "/g30", 0 ))<0) goto out;
if ((group2_id = H5Gcreate( file_id, "/g30/g1", 0 ))<0) goto out;
if ((group3_id = H5Gcreate( file_id, "/g30/g1/g2", 0 ))<0) goto out;
-
+
/* Close */
H5Gclose( group_id );
H5Gclose( group2_id );
@@ -2683,7 +2683,7 @@ PASSED();
H5Gclose( group3_id );
H5Gclose( group4_id );
H5Fclose( file1_id );
-
+
PASSED();
@@ -2803,14 +2803,14 @@ PASSED();
H5Gclose( group5_id );
if (H5Funmount(file_id, "/g36/g1")<0) goto out;
-
+
/* Close */
H5Gclose( group_id );
H5Gclose( group2_id );
H5Gclose( group3_id );
H5Gclose( group4_id );
H5Fclose( file1_id );
-
+
PASSED();
@@ -2916,7 +2916,7 @@ PASSED();
H5Fclose( file1_id );
H5Fclose( file2_id );
H5Fclose( file3_id );
-
+
PASSED();
/*-------------------------------------------------------------------------
@@ -2977,15 +2977,15 @@ PASSED();
H5Gclose( group2_id );
H5Fclose( file1_id );
H5Fclose( file2_id );
-
+
PASSED();
/*-------------------------------------------------------------------------
- * end tests
+ * end tests
*-------------------------------------------------------------------------
*/
-
+
/* Close file */
H5Fclose( file_id );
puts("All getname tests passed.");
diff --git a/test/gheap.c b/test/gheap.c
index 9417e73..a3a9f58 100644
--- a/test/gheap.c
+++ b/test/gheap.c
@@ -80,7 +80,7 @@ test_1 (hid_t fapl)
puts(" Unable to create file");
goto error;
}
-
+
/*
* Write the objects, monotonically increasing in length. Since this is
* a clean file, the addresses allocated for the collections should also
@@ -119,7 +119,7 @@ test_1 (hid_t fapl)
nerrors++;
}
}
-
+
if (H5Fclose(file)<0) goto error;
if (nerrors) goto error;
PASSED();
@@ -174,7 +174,7 @@ test_2 (hid_t fapl)
puts(" Unable to create file");
goto error;
}
-
+
/*
* Write the objects, monotonically decreasing in length.
*/
@@ -206,7 +206,7 @@ test_2 (hid_t fapl)
nerrors++;
}
}
-
+
if (H5Fclose(file)<0) goto error;
if (nerrors) goto error;
PASSED();
@@ -284,7 +284,7 @@ test_3 (hid_t fapl)
nerrors++;
}
}
-
+
if (H5Fclose(file)<0) goto error;
if (nerrors) goto error;
PASSED();
@@ -357,7 +357,7 @@ test_4 (hid_t fapl)
* Remove every third one beginning with the second, but after the
* next one has already been inserted. That is, insert A, B, C;
* remove B, insert D, E, F; remove E; etc.
- */
+ */
if (1==i%3) {
H5Eclear_stack(H5E_DEFAULT);
status = H5HG_remove (f, H5P_DATASET_XFER_DEFAULT, obj+i-1);
@@ -381,7 +381,7 @@ test_4 (hid_t fapl)
} H5E_END_TRY;
return MAX(1, nerrors);
}
-
+
/*-------------------------------------------------------------------------
* Function: main
@@ -407,7 +407,7 @@ main (void)
h5_reset();
fapl = h5_fileaccess();
-
+
nerrors += test_1(fapl);
nerrors += test_2(fapl);
nerrors += test_3(fapl);
diff --git a/test/h5test.c b/test/h5test.c
index a68e69f..b1a6d2f 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -17,7 +17,7 @@
* Thursday, November 19, 1998
*
* Purpose: Provides support functions for most of the hdf5 tests cases.
- *
+ *
*/
#undef NDEBUG /*override -DNDEBUG */
@@ -211,7 +211,7 @@ void
h5_reset(void)
{
char filename[1024];
-
+
HDfflush(stdout);
HDfflush(stderr);
H5close();
@@ -274,7 +274,7 @@ h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size)
char *ptr, last = '\0';
size_t i, j;
hid_t driver = -1;
-
+
if (!base_name || !fullname || size < 1)
return NULL;
@@ -290,7 +290,7 @@ h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size)
else if (H5FD_CORE == driver || H5FD_MULTI == driver)
suffix = NULL;
}
-
+
/* Use different ones depending on parallel or serial driver used. */
if (H5P_DEFAULT != fapl && (H5FD_MPIO == driver || H5FD_FPHDF5 == driver)) {
#ifdef H5_HAVE_PARALLEL
@@ -301,7 +301,7 @@ h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size)
*/
static int explained = 0;
- prefix = (paraprefix ? paraprefix : getenv_all(MPI_COMM_WORLD, 0, "HDF5_PARAPREFIX"));
+ prefix = (paraprefix ? paraprefix : getenv_all(MPI_COMM_WORLD, 0, "HDF5_PARAPREFIX"));
if (!prefix && !explained) {
/* print hint by process 0 once. */
@@ -450,7 +450,7 @@ h5_fileaccess(void)
const char *name;
char s[1024];
hid_t fapl = -1;
-
+
/* First use the environment variable, then the constant */
val = HDgetenv("HDF5_DRIVER");
#ifdef HDF5_DRIVER
@@ -459,7 +459,7 @@ h5_fileaccess(void)
if ((fapl=H5Pcreate(H5P_FILE_ACCESS))<0) return -1;
if (!val || !*val) return fapl; /*use default*/
-
+
HDstrncpy(s, val, sizeof s);
s[sizeof(s)-1] = '\0';
if (NULL==(name=HDstrtok(s, " \t\n\r"))) return fapl;
@@ -577,7 +577,7 @@ h5_show_hostname(void)
/* try show the process or thread id in multiple processes cases*/
#ifdef H5_HAVE_PARALLEL
- {
+ {
int mpi_rank, mpi_initialized;
MPI_Initialized(&mpi_initialized);
@@ -599,18 +599,18 @@ h5_show_hostname(void)
/* could not find a usable WinSock DLL */
return;
}
-
+
/* Confirm that the WinSock DLL supports 2.2.*/
/* Note that if the DLL supports versions greater */
/* than 2.2 in addition to 2.2, it will still return */
/* 2.2 in wVersion since that is the version we */
/* requested. */
-
+
if ( LOBYTE( wsaData.wVersion ) != 2 ||
HIBYTE( wsaData.wVersion ) != 2 ) {
/* could not find a usable WinSock DLL */
WSACleanup( );
- return;
+ return;
}
#endif
@@ -787,7 +787,7 @@ h5_get_file_size(const char *filename)
* and allow easy replacement for environments which don't have stdin/stdout
* available. (i.e. Windows & the Mac)
*/
-int
+int
print_func(const char *format, ...)
{
va_list arglist;
@@ -799,7 +799,7 @@ print_func(const char *format, ...)
return ret_value;
}
-#ifdef H5_HAVE_FILTER_SZIP
+#ifdef H5_HAVE_FILTER_SZIP
/*-------------------------------------------------------------------------
@@ -812,36 +812,36 @@ print_func(const char *format, ...)
* 0: only decode is enabled
* -1: other
*
- * Programmer:
+ * Programmer:
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
-int h5_szip_can_encode(void )
+int h5_szip_can_encode(void )
{
herr_t status;
unsigned int filter_config_flags;
status =H5Zget_filter_info(H5Z_FILTER_SZIP, &filter_config_flags);
- if ((filter_config_flags &
+ if ((filter_config_flags &
(H5Z_FILTER_CONFIG_ENCODE_ENABLED|H5Z_FILTER_CONFIG_DECODE_ENABLED)) == 0) {
/* filter present but neither encode nor decode is supported (???) */
return -1;
- } else if ((filter_config_flags &
- (H5Z_FILTER_CONFIG_ENCODE_ENABLED|H5Z_FILTER_CONFIG_DECODE_ENABLED)) ==
+ } else if ((filter_config_flags &
+ (H5Z_FILTER_CONFIG_ENCODE_ENABLED|H5Z_FILTER_CONFIG_DECODE_ENABLED)) ==
H5Z_FILTER_CONFIG_DECODE_ENABLED) {
/* decoder only: read but not write */
return 0;
- } else if ((filter_config_flags &
- (H5Z_FILTER_CONFIG_ENCODE_ENABLED|H5Z_FILTER_CONFIG_DECODE_ENABLED)) ==
+ } else if ((filter_config_flags &
+ (H5Z_FILTER_CONFIG_ENCODE_ENABLED|H5Z_FILTER_CONFIG_DECODE_ENABLED)) ==
H5Z_FILTER_CONFIG_ENCODE_ENABLED) {
/* encoder only: write but not read (???) */
return -1;
- } else if ((filter_config_flags &
- (H5Z_FILTER_CONFIG_ENCODE_ENABLED|H5Z_FILTER_CONFIG_DECODE_ENABLED)) ==
- (H5Z_FILTER_CONFIG_ENCODE_ENABLED|H5Z_FILTER_CONFIG_DECODE_ENABLED)) {
+ } else if ((filter_config_flags &
+ (H5Z_FILTER_CONFIG_ENCODE_ENABLED|H5Z_FILTER_CONFIG_DECODE_ENABLED)) ==
+ (H5Z_FILTER_CONFIG_ENCODE_ENABLED|H5Z_FILTER_CONFIG_DECODE_ENABLED)) {
return 1;
}
return(-1);
@@ -879,12 +879,12 @@ char* getenv_all(MPI_Comm comm, int root, const char* name)
int len = -1;
static char* env = NULL;
MPI_Status Status;
-
+
assert(name);
-
- MPI_Comm_rank(comm, &nID);
- /* The root task does the getenv call
+ MPI_Comm_rank(comm, &nID);
+
+ /* The root task does the getenv call
* and sends the result to the other tasks */
if(nID == root)
{
diff --git a/test/h5test.h b/test/h5test.h
index 2d08ab7..7aa585e 100644
--- a/test/h5test.h
+++ b/test/h5test.h
@@ -33,17 +33,17 @@
* Predefined test verbosity levels.
*
* Convention:
- *
+ *
* The higher the verbosity value, the more information printed.
* So, output for higher verbosity also include output of all lower
* verbosity.
- *
+ *
* Value Description
* 0 None: No informational message.
* 1 "All tests passed"
* 2 Header of overall test
* 3 Default: header and results of individual test
- * 4
+ * 4
* 5 Low: Major category of tests.
* 6
* 7 Medium: Minor category of tests such as functions called.
@@ -75,7 +75,7 @@
/*
* This contains the filename prefix specificied as command line option for
- * the parallel test files.
+ * the parallel test files.
*/
extern char *paraprefix;
#ifdef H5_HAVE_PARALLEL
@@ -125,7 +125,7 @@ H5TEST_DLL int print_func(const char *format, ...);
/* Routines for operating on the list of tests (for the "all in one" tests) */
H5TEST_DLL void TestUsage(void);
H5TEST_DLL void AddTest(const char *TheName, void (*TheCall) (void),
- void (*Cleanup) (void), const char *TheDescr,
+ void (*Cleanup) (void), const char *TheDescr,
const void *Parameters);
H5TEST_DLL void TestInfo(const char *ProgName);
H5TEST_DLL void TestParseCmdLine(int argc, char *argv[]);
@@ -145,7 +145,7 @@ H5TEST_DLL int TestErrPrintf(const char *format, ...);
H5TEST_DLL void SetTest(const char *testname, int action);
-#ifdef H5_HAVE_FILTER_SZIP
+#ifdef H5_HAVE_FILTER_SZIP
H5TEST_DLL int h5_szip_can_encode(void);
#endif /* H5_HAVE_FILTER_SZIP */
diff --git a/test/hyperslab.c b/test/hyperslab.c
index 75118d3..b954ace 100644
--- a/test/hyperslab.c
+++ b/test/hyperslab.c
@@ -115,7 +115,7 @@ print_array(uint8_t *array, size_t nx, size_t ny, size_t nz)
*
* Return: Success: 0
*
- * Failure:
+ * Failure:
*
* Programmer: Robb Matzke
* Friday, October 10, 1997
@@ -611,7 +611,7 @@ test_multifill(size_t nx)
hsize_t src_stride;
hsize_t dst_stride;
char s[64];
-
+
struct a_struct {
int left;
double mid;
@@ -686,7 +686,7 @@ test_multifill(size_t nx)
goto error;
}
}
-
+
puts(" PASSED");
HDfree(src);
HDfree(dst);
@@ -1238,9 +1238,9 @@ main(int argc, char *argv[])
#endif /* H5_HAVE_THREADSAFE */
/*
- *------------------------------
+ *------------------------------
* TEST HYPERSLAB FILL OPERATION
- *------------------------------
+ *------------------------------
*/
if (size_of_test & TEST_SMALL) {
status = test_fill(11, 0, 0, 1, 1, 1, 1, 1, 1);
@@ -1260,7 +1260,7 @@ main(int argc, char *argv[])
}
/*------------------------------
* TEST HYPERSLAB COPY OPERATION
- *------------------------------
+ *------------------------------
*/
/* exhaustive, one-dimensional test */
@@ -1325,7 +1325,7 @@ main(int argc, char *argv[])
}
/*---------------------
* TEST MULTI-BYTE FILL
- *---------------------
+ *---------------------
*/
if (size_of_test & TEST_SMALL) {
@@ -1359,7 +1359,7 @@ main(int argc, char *argv[])
}
/*-------------------------
* TEST SAMPLING OPERATIONS
- *-------------------------
+ *-------------------------
*/
if (size_of_test & TEST_SMALL) {
@@ -1372,7 +1372,7 @@ main(int argc, char *argv[])
}
/*-------------------------
* TEST ARRAY FILL OPERATIONS
- *-------------------------
+ *-------------------------
*/
if (size_of_test & TEST_SMALL) {
@@ -1385,7 +1385,7 @@ main(int argc, char *argv[])
}
/*-------------------------
* TEST ARRAY OFFSET OPERATIONS
- *-------------------------
+ *-------------------------
*/
if (size_of_test & TEST_SMALL) {
diff --git a/test/istore.c b/test/istore.c
index 2f3f907..f9e19d0 100644
--- a/test/istore.c
+++ b/test/istore.c
@@ -614,7 +614,7 @@ main(int argc, char *argv[])
printf("Cannot create file %s; test aborted\n", filename);
exit(1);
}
-
+
/*
* For testing file families, fool the library into thinking it already
* allocated a whole bunch of data.
@@ -682,7 +682,7 @@ main(int argc, char *argv[])
/* Close the test file and exit */
H5Pclose(fcpl);
H5Fclose(file);
-
+
if (nerrors) {
printf("***** %d I-STORE TEST%s FAILED! *****\n",
nerrors, 1 == nerrors ? "" : "S");
diff --git a/test/lheap.c b/test/lheap.c
index 09343e9..33b5210 100644
--- a/test/lheap.c
+++ b/test/lheap.c
@@ -123,7 +123,7 @@ main(void)
H5Eprint_stack(H5E_DEFAULT, stdout);
goto error;
}
-
+
if (NULL == (s = H5HL_offset_into(f, heap, obj[i]))) {
H5_FAILED();
H5Eprint_stack(H5E_DEFAULT, stdout);
diff --git a/test/links.c b/test/links.c
index 17a828b..cb165fa 100644
--- a/test/links.c
+++ b/test/links.c
@@ -86,7 +86,7 @@ mklinks(hid_t fapl)
"/grp1/recursive")<0) {
goto error;
}
-
+
/* Close */
if (H5Sclose (scalar)<0) goto error;
if (H5Fclose (file)<0) goto error;
@@ -108,8 +108,8 @@ mklinks(hid_t fapl)
*
* Failure: -1
*
- * Programmer: Raymond Lu
- * Friday, April 19, 2002
+ * Programmer: Raymond Lu
+ * Friday, April 19, 2002
*
* Modifications:
*
@@ -122,7 +122,7 @@ new_links(hid_t fapl)
hid_t grp1_a=(-1), grp1_b=(-1), grp2_a=(-1), grp2_b=(-1);
hid_t scalar=(-1);
hid_t dset1=(-1), dset2=(-1);
- char filename[1024];
+ char filename[1024];
hsize_t size[1] = {1};
TESTING("H5Glink2 function");
@@ -145,7 +145,7 @@ new_links(hid_t fapl)
if ((grp2_b=H5Gcreate (file_b, "grp2", (size_t)0))<0) goto error;
/* Create datasets */
- if((dset1=H5Dcreate(file_a, "dataset1", H5T_NATIVE_INT, scalar,
+ if((dset1=H5Dcreate(file_a, "dataset1", H5T_NATIVE_INT, scalar,
H5P_DEFAULT))<0) {
goto error;
}
@@ -154,27 +154,27 @@ new_links(hid_t fapl)
goto error;
}
- /* Create links within a file. Both of source and destination use
+ /* Create links within a file. Both of source and destination use
* H5G_SAME_LOC. Both hard and soft links should fail. */
H5E_BEGIN_TRY {
- if(H5Glink2(H5G_SAME_LOC, "dataset1", H5G_LINK_HARD , H5G_SAME_LOC,
+ if(H5Glink2(H5G_SAME_LOC, "dataset1", H5G_LINK_HARD , H5G_SAME_LOC,
"hard")!=FAIL) goto error;
} H5E_END_TRY;
H5E_BEGIN_TRY {
- if(H5Glink2(H5G_SAME_LOC, "dataset1", H5G_LINK_SOFT , H5G_SAME_LOC,
+ if(H5Glink2(H5G_SAME_LOC, "dataset1", H5G_LINK_SOFT , H5G_SAME_LOC,
"soft")!=FAIL) goto error;
} H5E_END_TRY;
/* Create links across files. Both hard and soft links should fail. */
H5E_BEGIN_TRY {
- if(H5Glink2(file_a, "dataset1", H5G_LINK_HARD , file_b,
+ if(H5Glink2(file_a, "dataset1", H5G_LINK_HARD , file_b,
"hard")!=FAIL) goto error;
} H5E_END_TRY;
H5E_BEGIN_TRY {
if(H5Glink2(file_a, "dataset1", H5G_LINK_SOFT, file_b, "soft")!=FAIL)
goto error;
} H5E_END_TRY;
-
+
/* Create links to test H5G_SAME_LOC, H5G_LINK_HARD, H5G_LINK_SOFT. */
if(H5Glink2(grp1_a, "dataset2", H5G_LINK_HARD , H5G_SAME_LOC,
"hard1")<0) {
@@ -185,7 +185,7 @@ new_links(hid_t fapl)
goto error;
}
- /* Create links to test H5G_LINK_HARD, H5G_LINK_SOFT across different
+ /* Create links to test H5G_LINK_HARD, H5G_LINK_SOFT across different
* locations. */
if(H5Glink2(grp1_a, "dataset2", H5G_LINK_HARD, grp2_a, "hard2")<0) {
goto error;
@@ -364,7 +364,7 @@ cklinks(hid_t fapl)
* Failure: -1
*
* Programmer: Raymond Lu
- * Thursday, April 25, 2002
+ * Thursday, April 25, 2002
*
* Modifications:
*
@@ -386,8 +386,8 @@ ck_new_links(hid_t fapl)
goto error;
}
- /* Get hard link info */
- if(H5Gget_objinfo(file, "/grp1/dataset2", TRUE, &sb_dset)<0)
+ /* Get hard link info */
+ if(H5Gget_objinfo(file, "/grp1/dataset2", TRUE, &sb_dset)<0)
goto error;
if(H5Gget_objinfo(file, "/grp1/hard1", TRUE, &sb_hard1)<0)
goto error;
@@ -468,7 +468,7 @@ long_links(hid_t fapl)
hid_t gid2 = (-1); /* Datatype ID */
char *objname = NULL; /* Name of object [Long] */
size_t u; /* Local index variable */
- char filename[1024];
+ char filename[1024];
TESTING("long names for objects & links");
diff --git a/test/mount.c b/test/mount.c
index 762c7b1..3b9d4ce 100644
--- a/test/mount.c
+++ b/test/mount.c
@@ -92,7 +92,7 @@ setup(hid_t fapl)
if (H5Fclose(file)<0) goto error;
return 0;
-
+
error:
H5E_BEGIN_TRY {
H5Fclose(file);
@@ -146,7 +146,7 @@ test_basic(hid_t fapl)
PASSED();
return 0;
-
+
error:
H5E_BEGIN_TRY {
H5Fclose(file1);
@@ -184,7 +184,7 @@ test_illegal(hid_t fapl)
h5_fixname(FILENAME[0], fapl, filename1, sizeof filename1);
h5_fixname(FILENAME[1], fapl, filename2, sizeof filename2);
h5_fixname(FILENAME[2], fapl, filename3, sizeof filename3);
-
+
/* Open the files */
if ((file1=H5Fopen(filename1, H5F_ACC_RDONLY, fapl))<0 ||
@@ -219,7 +219,7 @@ test_illegal(hid_t fapl)
}
if (H5Funmount(mnt, ".")<0) goto error;
if (H5Gclose(mnt)<0) goto error;
-
+
/* Close everything and return */
if (H5Fclose(file1)<0) goto error;
@@ -267,14 +267,14 @@ test_hide(hid_t fapl)
TESTING("name hiding under mount point");
h5_fixname(FILENAME[0], fapl, filename1, sizeof filename1);
h5_fixname(FILENAME[1], fapl, filename2, sizeof filename2);
-
+
if ((file1=H5Fopen(filename1, H5F_ACC_RDONLY, fapl))<0 ||
(file2=H5Fopen(filename2, H5F_ACC_RDONLY, fapl))<0)
goto error;
/* Get information about file1:/mnt1/file1 for later */
if (H5Gget_objinfo(file1, "/mnt1/file1", TRUE, &sb1)<0) goto error;
-
+
/* Build the virtual file */
if (H5Fmount(file1, "/mnt1", file2, H5P_DEFAULT)<0) goto error;
@@ -339,11 +339,11 @@ test_assoc(hid_t fapl)
hid_t file1=-1, file2=-1;
H5G_stat_t sb1, sb2;
char filename1[1024], filename2[1024];
-
+
TESTING("mount point open");
h5_fixname(FILENAME[0], fapl, filename1, sizeof filename1);
h5_fixname(FILENAME[1], fapl, filename2, sizeof filename2);
-
+
/* Open the files */
if ((file1=H5Fopen(filename1, H5F_ACC_RDONLY, fapl))<0 ||
(file2=H5Fopen(filename2, H5F_ACC_RDONLY, fapl))<0)
@@ -365,7 +365,7 @@ test_assoc(hid_t fapl)
puts(" Association failed.");
goto error;
}
-
+
/* Shut down */
if (H5Funmount(file1, "/mnt1_link")<0) goto error;
if (H5Fclose(file1)<0) goto error;
@@ -410,7 +410,7 @@ test_mntlnk(hid_t fapl)
h5_fixname(FILENAME[0], fapl, filename1, sizeof filename1);
h5_fixname(FILENAME[1], fapl, filename2, sizeof filename2);
-
+
/* Build the virtual file */
if ((file1=H5Fopen(filename1, H5F_ACC_RDONLY, fapl))<0 ||
(file2=H5Fopen(filename2, H5F_ACC_RDONLY, fapl))<0)
@@ -467,11 +467,11 @@ test_move(hid_t fapl)
hid_t file1=-1, file2=-1;
herr_t status;
char filename1[1024], filename2[1024];
-
+
TESTING("object renaming");
h5_fixname(FILENAME[0], fapl, filename1, sizeof filename1);
h5_fixname(FILENAME[1], fapl, filename2, sizeof filename2);
-
+
/* Build the virtual file */
if ((file1=H5Fopen(filename1, H5F_ACC_RDWR, fapl))<0 ||
(file2=H5Fopen(filename2, H5F_ACC_RDWR, fapl))<0)
@@ -531,14 +531,14 @@ test_preopen(hid_t fapl)
TESTING("preopening objects under the mount point");
h5_fixname(FILENAME[0], fapl, filename1, sizeof filename1);
h5_fixname(FILENAME[1], fapl, filename2, sizeof filename2);
-
+
if ((file1=H5Fopen(filename1, H5F_ACC_RDONLY, fapl))<0 ||
(file2=H5Fopen(filename2, H5F_ACC_RDONLY, fapl))<0)
goto error;
/* Open something under the mount point */
if ((grp=H5Gopen(file1, "/mnt1/file1"))<0) goto error;
-
+
/* Build the virtual file */
if (H5Fmount(file1, "/mnt1", file2, H5P_DEFAULT)<0) goto error;
@@ -584,7 +584,7 @@ test_preopen(hid_t fapl)
static int
test_postopen(hid_t fapl)
{
-
+
hid_t file1=-1, file2=-1, grp=-1;
char filename1[1024], filename2[1024];
@@ -603,7 +603,7 @@ test_postopen(hid_t fapl)
/* Unmount the file */
if (H5Funmount(file1, "/mnt1")<0) goto error;
-
+
/* Now access the thing we previously opened */
if (H5Gget_objinfo(grp, ".", TRUE, NULL)<0) goto error;
@@ -688,7 +688,7 @@ test_unlink(hid_t fapl)
puts(" Incorrect traversal from mount point!");
goto error;
}
-
+
/* Unlink the mount point */
if (H5Gunlink(file1, "/mnt_unlink")<0) goto error;
@@ -736,7 +736,7 @@ test_unlink(hid_t fapl)
goto error;
}
if (H5Funmount(mnt, ".")<0) goto error;
-
+
/* Close files */
if (H5Gclose(mnt)<0) goto error;
if (H5Gclose(root)<0) goto error;
@@ -777,11 +777,11 @@ test_mvmpt(hid_t fapl)
{
hid_t file1=-1, file2=-1;
char filename1[1024], filename2[1024];
-
+
TESTING("mount point renaming");
h5_fixname(FILENAME[0], fapl, filename1, sizeof filename1);
h5_fixname(FILENAME[1], fapl, filename2, sizeof filename2);
-
+
/* Build the virtual file */
if ((file1=H5Fopen(filename1, H5F_ACC_RDWR, fapl))<0 ||
(file2=H5Fopen(filename2, H5F_ACC_RDWR, fapl))<0)
@@ -833,11 +833,11 @@ test_interlink(hid_t fapl)
char filename1[1024], filename2[1024];
herr_t status;
hsize_t cur_dims[1] = {2};
-
+
TESTING("interfile hard links");
h5_fixname(FILENAME[0], fapl, filename1, sizeof filename1);
h5_fixname(FILENAME[1], fapl, filename2, sizeof filename2);
-
+
/* Build the virtual file */
if ((file1=H5Fopen(filename1, H5F_ACC_RDWR, fapl))<0 ||
(file2=H5Fopen(filename2, H5F_ACC_RDWR, fapl))<0)
@@ -876,7 +876,7 @@ test_interlink(hid_t fapl)
puts(" Dataset and shared type must be in the same file!");
goto error;
}
-
+
/* Shut down */
if (H5Sclose(space)<0) goto error;
if (H5Tclose(type)<0) goto error;
@@ -920,11 +920,11 @@ test_uniformity(hid_t fapl)
{
hid_t file1=-1, file2=-1;
char filename1[1024], filename2[1024];
-
+
TESTING("file handle uniformity");
h5_fixname(FILENAME[0], fapl, filename1, sizeof filename1);
h5_fixname(FILENAME[1], fapl, filename2, sizeof filename2);
-
+
/* Build the virtual file */
if ((file1=H5Fopen(filename1, H5F_ACC_RDWR, fapl))<0 ||
(file2=H5Fopen(filename2, H5F_ACC_RDWR, fapl))<0)
@@ -937,7 +937,7 @@ test_uniformity(hid_t fapl)
if (H5Gget_objinfo(file1, "mnt1", TRUE, NULL)<0) TEST_ERROR;
if (H5Gget_objinfo(file1, "/mnt1/file2", TRUE, NULL)<0) TEST_ERROR;
if (H5Gget_objinfo(file1, "mnt1/file2", TRUE, NULL)<0) TEST_ERROR;
-
+
/* Access the same things from the file2 handle */
if (H5Gget_objinfo(file2, "/", TRUE, NULL)<0) TEST_ERROR;
if (H5Gget_objinfo(file2, "/mnt1", TRUE, NULL)<0) TEST_ERROR;
@@ -982,11 +982,11 @@ test_close(hid_t fapl)
{
hid_t file1=-1, file2=-1;
char filename1[1024], filename2[1024];
-
+
TESTING("file handle close");
h5_fixname(FILENAME[0], fapl, filename1, sizeof filename1);
h5_fixname(FILENAME[1], fapl, filename2, sizeof filename2);
-
+
/* Build the virtual file */
if ((file1=H5Fopen(filename1, H5F_ACC_RDWR, fapl))<0 ||
(file2=H5Fopen(filename2, H5F_ACC_RDWR, fapl))<0)
@@ -1019,11 +1019,11 @@ test_close(hid_t fapl)
/*
* Close file2. It is not actually closed because it's a child of file1.
- */
+ */
if (H5Fclose(file2)<0) goto error;
if (H5Gget_objinfo(file1, "/mnt1/file2", TRUE, NULL)<0) goto error;
if (H5Fclose(file1)<0) goto error;
-
+
/* Check that all file IDs have been closed */
if(H5I_nmembers(H5I_FILE) != 0)
TEST_ERROR
@@ -1041,7 +1041,7 @@ test_close(hid_t fapl)
} H5E_END_TRY;
return 1;
}
-
+
/*-------------------------------------------------------------------------
* Function: test_mount_after_close
@@ -1072,11 +1072,11 @@ test_mount_after_close(hid_t fapl)
char objname[NAME_BUF_SIZE]; /* Name of object opened */
hsize_t dims[] = {NX,NY}; /* Dataset dimensions */
int i, j; /* Local index variable */
-
+
TESTING("mounting on group after file is closed");
h5_fixname(FILENAME[0], fapl, filename1, sizeof filename1);
h5_fixname(FILENAME[1], fapl, filename2, sizeof filename2);
-
+
/*
* Initialization of buffer matrix "bm"
*/
@@ -1243,7 +1243,7 @@ test_mount_after_close(hid_t fapl)
TEST_ERROR
if(H5Fclose(fid2) < 0)
TEST_ERROR
-
+
/* Shut down */
PASSED();
return 0;
@@ -1266,7 +1266,7 @@ error:
} H5E_END_TRY;
return 1;
}
-
+
/*-------------------------------------------------------------------------
* Function: test_mount_after_unmount
@@ -1303,13 +1303,13 @@ test_mount_after_unmount(hid_t fapl)
filename3[1024],
filename4[1024]; /* Name of files to mount */
char objname[NAME_BUF_SIZE]; /* Name of object opened */
-
+
TESTING("mounting after file is unmounted");
h5_fixname(FILENAME[0], fapl, filename1, sizeof filename1);
h5_fixname(FILENAME[1], fapl, filename2, sizeof filename2);
h5_fixname(FILENAME[2], fapl, filename3, sizeof filename3);
h5_fixname(FILENAME[3], fapl, filename4, sizeof filename4);
-
+
/* Create first file and some groups in it. */
if((fid1 = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR
@@ -1508,7 +1508,7 @@ test_mount_after_unmount(hid_t fapl)
TEST_ERROR
if(H5Fclose(fid1) < 0)
TEST_ERROR
-
+
/* Shut down */
PASSED();
return 0;
@@ -1535,7 +1535,7 @@ error:
} H5E_END_TRY;
return 1;
}
-
+
/*-------------------------------------------------------------------------
* Function: test_missing_unmount
@@ -1563,13 +1563,13 @@ test_missing_unmount(hid_t fapl)
char filename1[1024],
filename2[1024],
filename3[1024]; /* Name of files to mount */
-
+
TESTING("missing unmount");
h5_fixname(FILENAME[0], fapl, filename1, sizeof filename1);
h5_fixname(FILENAME[1], fapl, filename2, sizeof filename2);
h5_fixname(FILENAME[2], fapl, filename3, sizeof filename3);
-
+
/* Create file #1 */
if((fid1 = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -1692,7 +1692,7 @@ error:
} H5E_END_TRY;
return 1;
} /* end test_missing_unmount() */
-
+
/*-------------------------------------------------------------------------
* Function: test_hold_open_file
@@ -1718,12 +1718,12 @@ test_hold_open_file(hid_t fapl)
hid_t gidA = -1, gidM = -1, gidAM = -1; /* Group IDs */
char filename1[1024],
filename2[1024]; /* Name of files to mount */
-
+
TESTING("hold open w/file");
h5_fixname(FILENAME[0], fapl, filename1, sizeof filename1);
h5_fixname(FILENAME[1], fapl, filename2, sizeof filename2);
-
+
/* Create file #1 */
if((fid1 = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -1825,7 +1825,7 @@ error:
} H5E_END_TRY;
return 1;
} /* end test_hold_open_file() */
-
+
/*-------------------------------------------------------------------------
* Function: test_hold_open_group
@@ -1851,12 +1851,12 @@ test_hold_open_group(hid_t fapl)
hid_t gid = -1, gidA = -1, gidM = -1, gidAM = -1, gidAM2 = -1; /* Group IDs */
char filename1[1024],
filename2[1024]; /* Name of files to mount */
-
+
TESTING("hold open w/group");
h5_fixname(FILENAME[0], fapl, filename1, sizeof filename1);
h5_fixname(FILENAME[1], fapl, filename2, sizeof filename2);
-
+
/* Create file #1 */
if((fid1 = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -1984,7 +1984,7 @@ error:
} H5E_END_TRY;
return 1;
} /* end test_hold_open_group() */
-
+
/*-------------------------------------------------------------------------
* Function: test_fcdegree_same
@@ -2012,12 +2012,12 @@ test_fcdegree_same(hid_t fapl)
herr_t ret; /* Generic return value */
char filename1[1024],
filename2[1024]; /* Name of files to mount */
-
+
TESTING("file close degrees must be same");
h5_fixname(FILENAME[0], fapl, filename1, sizeof filename1);
h5_fixname(FILENAME[1], fapl, filename2, sizeof filename2);
-
+
/* Create file #1 */
if((fid1 = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -2129,7 +2129,7 @@ error:
} H5E_END_TRY;
return 1;
} /* end test_fcdegree_same() */
-
+
/*-------------------------------------------------------------------------
* Function: test_fcdegree_semi
@@ -2157,12 +2157,12 @@ test_fcdegree_semi(hid_t fapl)
herr_t ret; /* Generic return value */
char filename1[1024],
filename2[1024]; /* Name of files to mount */
-
+
TESTING("'semi' file close degree");
h5_fixname(FILENAME[0], fapl, filename1, sizeof filename1);
h5_fixname(FILENAME[1], fapl, filename2, sizeof filename2);
-
+
/* Create file #1 */
if((fid1 = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -2271,7 +2271,7 @@ error:
} H5E_END_TRY;
return 1;
} /* end test_fcdegree_semi() */
-
+
/*-------------------------------------------------------------------------
* Function: test_fcdegree_strong
@@ -2299,12 +2299,12 @@ test_fcdegree_strong(hid_t fapl)
herr_t ret; /* Generic return value */
char filename1[1024],
filename2[1024]; /* Name of files to mount */
-
+
TESTING("'strong' file close degree");
h5_fixname(FILENAME[0], fapl, filename1, sizeof filename1);
h5_fixname(FILENAME[1], fapl, filename2, sizeof filename2);
-
+
/* Create file #1 */
if((fid1 = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -2409,7 +2409,7 @@ error:
} H5E_END_TRY;
return 1;
} /* end test_fcdegree_strong() */
-
+
/*-------------------------------------------------------------------------
* Function: test_acc_perm
@@ -2441,13 +2441,13 @@ test_acc_perm(hid_t fapl)
char filename1[1024],
filename2[1024],
filename3[1024]; /* Name of files to mount */
-
+
TESTING("access permissions");
h5_fixname(FILENAME[0], fapl, filename1, sizeof filename1);
h5_fixname(FILENAME[1], fapl, filename2, sizeof filename2);
h5_fixname(FILENAME[2], fapl, filename3, sizeof filename3);
-
+
/* Create file #1 */
if((fid1 = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -2646,13 +2646,13 @@ test_mult_mount(hid_t fapl)
char filename1[1024],
filename2[1024],
filename3[1024]; /* Name of files to mount */
-
+
TESTING("multiple mounts");
h5_fixname(FILENAME[0], fapl, filename1, sizeof filename1);
h5_fixname(FILENAME[1], fapl, filename2, sizeof filename2);
h5_fixname(FILENAME[2], fapl, filename3, sizeof filename3);
-
+
/* Create file #1 */
if((fid1 = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -2874,13 +2874,13 @@ test_nested_survive(hid_t fapl)
char filename1[1024],
filename2[1024],
filename3[1024]; /* Name of files to mount */
-
+
TESTING("nested mounts survive");
h5_fixname(FILENAME[0], fapl, filename1, sizeof filename1);
h5_fixname(FILENAME[1], fapl, filename2, sizeof filename2);
h5_fixname(FILENAME[2], fapl, filename3, sizeof filename3);
-
+
/* Create file #1 */
if((fid1 = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -3085,12 +3085,12 @@ test_close_parent(hid_t fapl)
ssize_t name_len; /* Filename length */
char filename1[1024],
filename2[1024]; /* Name of files to mount */
-
+
TESTING("close parent");
h5_fixname(FILENAME[0], fapl, filename1, sizeof filename1);
h5_fixname(FILENAME[1], fapl, filename2, sizeof filename2);
-
+
/* Create file #1 */
if((fid1 = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -3271,7 +3271,7 @@ test_cut_graph(hid_t fapl)
filename5[NAME_BUF_SIZE],
filename6[NAME_BUF_SIZE],
filename7[NAME_BUF_SIZE]; /* Name of files to mount */
-
+
TESTING("cutting mount graph");
h5_fixname(FILENAME[0], fapl, filename1, sizeof filename1);
@@ -3281,7 +3281,7 @@ test_cut_graph(hid_t fapl)
h5_fixname(FILENAME[4], fapl, filename5, sizeof filename3);
h5_fixname(FILENAME[5], fapl, filename6, sizeof filename3);
h5_fixname(FILENAME[6], fapl, filename7, sizeof filename3);
-
+
/* Create file #1 & it's groups */
if((fid1 = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -3656,13 +3656,13 @@ test_symlink(hid_t fapl)
char filename1[NAME_BUF_SIZE],
filename2[NAME_BUF_SIZE],
filename3[NAME_BUF_SIZE]; /* Name of files to mount */
-
+
TESTING("symlinks");
h5_fixname(FILENAME[0], fapl, filename1, sizeof filename1);
h5_fixname(FILENAME[1], fapl, filename2, sizeof filename2);
h5_fixname(FILENAME[2], fapl, filename3, sizeof filename3);
-
+
/* Create file #1 & it's groups */
if((fid1 = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -3847,12 +3847,12 @@ main(void)
nerrors += test_close_parent(fapl);
nerrors += test_cut_graph(fapl);
nerrors += test_symlink(fapl);
-
+
if (nerrors) goto error;
puts("All mount tests passed.");
h5_cleanup(FILENAME, fapl);
return 0;
-
+
error:
puts("***** MOUNT ERRORS *****");
return 1;
diff --git a/test/mtime.c b/test/mtime.c
index 2c0d2dd..18f0bbf 100644
--- a/test/mtime.c
+++ b/test/mtime.c
@@ -39,9 +39,9 @@ const char *FILENAME[] = {
*
* Purpose: H5O_mtime_decode() test.
*
- * Return: Success:
+ * Return: Success:
*
- * Failure:
+ * Failure:
*
* Programmer: Robb Matzke
* Thursday, July 30, 1998
@@ -68,9 +68,9 @@ main(void)
h5_reset();
fapl = h5_fileaccess();
-
+
TESTING("modification time messages");
-
+
/* Create the file, create a dataset, then close the file */
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0)
@@ -104,7 +104,7 @@ main(void)
puts(" name.");
goto error;
}
-
+
/* Compare times -- they must be within 60 seconds of one another */
if (0==sb1.mtime) {
SKIPPED();
@@ -122,12 +122,12 @@ main(void)
goto error;
}
PASSED();
-
+
/* Check opening existing file with old-style modification time information
* and make certain that the time is correct
*/
TESTING("accessing old modification time messages");
-
+
{
char testfile[512]="";
char *srcdir = HDgetenv("srcdir");
@@ -162,7 +162,7 @@ main(void)
* and make certain that the time is correct
*/
TESTING("accessing new modification time messages");
-
+
{
char testfile[512]="";
char *srcdir = HDgetenv("srcdir");
@@ -202,4 +202,4 @@ main(void)
}
-
+
diff --git a/test/ntypes.c b/test/ntypes.c
index 83b7c5b..ef2c2b2 100644
--- a/test/ntypes.c
+++ b/test/ntypes.c
@@ -14,7 +14,7 @@
/*
* Programmer: Raymond Lu
- * October 14, 2001
+ * October 14, 2001
*
* Purpose: Tests the H5Tget_native_type function.
*/
@@ -115,33 +115,33 @@ test_atomic_dtype(hid_t file)
if((dataset=H5Dopen(file, DSET_ATOMIC_NAME_1))<0) TEST_ERROR;
if((dtype=H5Dget_type(dataset))<0) TEST_ERROR;
-
+
if((native_type=H5Tget_native_type(dtype, H5T_DIR_DEFAULT))<0)
TEST_ERROR;
/* Verify the datatype retrieved and converted */
- if(H5Tget_order(native_type) != H5Tget_order(H5T_NATIVE_INT))
+ if(H5Tget_order(native_type) != H5Tget_order(H5T_NATIVE_INT))
TEST_ERROR;
if(H5Tget_size(native_type) < H5Tget_size(H5T_STD_I32BE))
TEST_ERROR;
if(H5T_INTEGER!=H5Tget_class(native_type))
TEST_ERROR;
- /* Read the dataset back. The temporary buffer is for special platforms
+ /* Read the dataset back. The temporary buffer is for special platforms
* like Cray. */
tmp = malloc((size_t)(DIM0*DIM1*H5Tget_size(native_type)));
-
+
if (H5Dread(dataset, native_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, tmp)<0)
TEST_ERROR;
-
+
/* Copy data from temporary buffer to destination buffer */
- memcpy(icheck2, tmp, (size_t)(DIM0*DIM1*H5Tget_size(native_type)));
+ memcpy(icheck2, tmp, (size_t)(DIM0*DIM1*H5Tget_size(native_type)));
free(tmp);
-
+
/* Convert to the integer type */
if(H5Tconvert(native_type, H5T_NATIVE_INT, (DIM0*DIM1), icheck2, NULL, H5P_DEFAULT)<0)
TEST_ERROR;
-
+
/* Check that the values read are the same as the values written */
for (i = 0; i < DIM0; i++) {
for (j = 0; j < DIM1; j++) {
@@ -165,18 +165,18 @@ test_atomic_dtype(hid_t file)
H5P_DEFAULT))<0) TEST_ERROR;
if((dtype=H5Dget_type(dataset))<0) TEST_ERROR;
-
+
if((native_type=H5Tget_native_type(dtype, H5T_DIR_DEFAULT))<0)
TEST_ERROR;
-
+
/* Verify the datatype retrieved and converted */
- if(H5Tget_order(native_type) != H5Tget_order(H5T_NATIVE_LLONG))
+ if(H5Tget_order(native_type) != H5Tget_order(H5T_NATIVE_LLONG))
TEST_ERROR;
if(H5Tget_size(native_type) < H5Tget_size(H5T_STD_I64LE))
TEST_ERROR;
if(H5T_INTEGER!=H5Tget_class(native_type))
TEST_ERROR;
-
+
if(H5Dclose(dataset)<0) TEST_ERROR;
if(H5Tclose(native_type)<0) TEST_ERROR;
if(H5Tclose(dtype)<0) TEST_ERROR;
@@ -187,70 +187,70 @@ test_atomic_dtype(hid_t file)
H5P_DEFAULT))<0) TEST_ERROR;
if((dtype=H5Dget_type(dataset))<0) TEST_ERROR;
-
+
if((native_type=H5Tget_native_type(dtype, H5T_DIR_ASCEND))<0)
TEST_ERROR;
-
+
/* Verify the datatype retrieved and converted */
- if(H5Tget_order(native_type) != H5Tget_order(H5T_NATIVE_CHAR))
+ if(H5Tget_order(native_type) != H5Tget_order(H5T_NATIVE_CHAR))
TEST_ERROR;
if(H5Tget_size(native_type) < H5Tget_size(H5T_STD_I8LE))
TEST_ERROR;
if(H5T_INTEGER!=H5Tget_class(native_type))
TEST_ERROR;
-
+
if(H5Dclose(dataset)<0) TEST_ERROR;
if(H5Tclose(native_type)<0) TEST_ERROR;
if(H5Tclose(dtype)<0) TEST_ERROR;
-
-
+
+
/* Create the dataset of H5T_IEEE_F32BE */
if ((dataset = H5Dcreate(file, DSET_ATOMIC_NAME_4, H5T_IEEE_F32BE, space,
H5P_DEFAULT))<0) TEST_ERROR;
if((dtype=H5Dget_type(dataset))<0) TEST_ERROR;
-
+
if((native_type=H5Tget_native_type(dtype, H5T_DIR_DESCEND))<0)
TEST_ERROR;
-
+
/* Verify the datatype retrieved and converted */
- if(H5Tget_order(native_type) != H5Tget_order(H5T_NATIVE_FLOAT))
+ if(H5Tget_order(native_type) != H5Tget_order(H5T_NATIVE_FLOAT))
TEST_ERROR;
if(H5Tget_size(native_type) < H5Tget_size(H5T_IEEE_F32BE))
TEST_ERROR;
if(H5T_FLOAT!=H5Tget_class(native_type))
TEST_ERROR;
-
+
if(H5Dclose(dataset)<0) TEST_ERROR;
if(H5Tclose(native_type)<0) TEST_ERROR;
if(H5Tclose(dtype)<0) TEST_ERROR;
-
-
+
+
/* Create the dataset of H5T_IEEE_F64BE */
if ((dataset = H5Dcreate(file, DSET_ATOMIC_NAME_5, H5T_IEEE_F64BE, space,
H5P_DEFAULT))<0) TEST_ERROR;
if((dtype=H5Dget_type(dataset))<0) TEST_ERROR;
-
+
if((native_type=H5Tget_native_type(dtype, H5T_DIR_DESCEND))<0)
TEST_ERROR;
-
+
/* Verify the datatype retrieved and converted */
- if(H5Tget_order(native_type) != H5Tget_order(H5T_NATIVE_DOUBLE))
+ if(H5Tget_order(native_type) != H5Tget_order(H5T_NATIVE_DOUBLE))
TEST_ERROR;
if(H5Tget_size(native_type) < H5Tget_size(H5T_IEEE_F64BE))
TEST_ERROR;
if(H5T_FLOAT!=H5Tget_class(native_type))
TEST_ERROR;
-
+
if(H5Dclose(dataset)<0) TEST_ERROR;
if(H5Tclose(native_type)<0) TEST_ERROR;
if(H5Tclose(dtype)<0) TEST_ERROR;
-
-
+
+
/* Close dataspace */
if(H5Sclose(space)<0) TEST_ERROR;
-
+
PASSED();
return 0;
@@ -377,9 +377,9 @@ test_compound_dtype2(hid_t file)
if(H5Dclose(dataset)<0) TEST_ERROR;
/* Close dataspace */
- if(H5Sclose(space)<0) TEST_ERROR;
+ if(H5Sclose(space)<0) TEST_ERROR;
+
-
/* Open dataset again to check H5Tget_native_type */
if((dataset=H5Dopen(file, DSET_COMPOUND_NAME_2))<0) TEST_ERROR;
@@ -387,34 +387,34 @@ test_compound_dtype2(hid_t file)
if((native_type=H5Tget_native_type(dtype, H5T_DIR_DEFAULT))<0)
TEST_ERROR;
-
+
/* Verify the datatype of each field retrieved and converted */
/* check the char member */
if((mem_id = H5Tget_member_type(native_type, 0))<0)
TEST_ERROR;
- if(H5Tget_order(mem_id) != H5Tget_order(H5T_NATIVE_UCHAR))
+ if(H5Tget_order(mem_id) != H5Tget_order(H5T_NATIVE_UCHAR))
TEST_ERROR;
if(H5Tget_size(mem_id) < H5Tget_size(H5T_STD_U8LE))
TEST_ERROR;
if(H5T_INTEGER!=H5Tget_class(mem_id))
TEST_ERROR;
H5Tclose(mem_id);
-
- /* check the integer member */
+
+ /* check the integer member */
if((mem_id = H5Tget_member_type(native_type, 1))<0)
TEST_ERROR;
- if(H5Tget_order(mem_id) != H5Tget_order(H5T_NATIVE_INT))
+ if(H5Tget_order(mem_id) != H5Tget_order(H5T_NATIVE_INT))
TEST_ERROR;
if(H5Tget_size(mem_id) < H5Tget_size(H5T_STD_I32LE))
TEST_ERROR;
if(H5T_INTEGER!=H5Tget_class(mem_id))
TEST_ERROR;
H5Tclose(mem_id);
-
+
/* check the long long member */
if((mem_id = H5Tget_member_type(native_type, 3))<0)
TEST_ERROR;
- if(H5Tget_order(mem_id) != H5Tget_order(H5T_NATIVE_ULLONG))
+ if(H5Tget_order(mem_id) != H5Tget_order(H5T_NATIVE_ULLONG))
TEST_ERROR;
if(H5Tget_size(mem_id) < H5Tget_size(H5T_STD_U64BE))
TEST_ERROR;
@@ -425,10 +425,10 @@ test_compound_dtype2(hid_t file)
/* check the nested compound member */
if((nest_mem_id = H5Tget_member_type(native_type, 2))<0)
TEST_ERROR;
-
+
if((mem_id = H5Tget_member_type(nest_mem_id, 0))<0)
TEST_ERROR;
- if(H5Tget_order(mem_id) != H5Tget_order(H5T_NATIVE_SHORT))
+ if(H5Tget_order(mem_id) != H5Tget_order(H5T_NATIVE_SHORT))
TEST_ERROR;
if(H5Tget_size(mem_id) < H5Tget_size(H5T_STD_I16BE))
TEST_ERROR;
@@ -438,7 +438,7 @@ test_compound_dtype2(hid_t file)
if((mem_id = H5Tget_member_type(nest_mem_id, 1))<0)
TEST_ERROR;
- if(H5Tget_order(mem_id) != H5Tget_order(H5T_NATIVE_LONG))
+ if(H5Tget_order(mem_id) != H5Tget_order(H5T_NATIVE_LONG))
TEST_ERROR;
#if H5_SIZEOF_LONG==4
if(H5Tget_size(mem_id) < H5Tget_size(H5T_STD_I32LE)) TEST_ERROR;
@@ -450,13 +450,13 @@ test_compound_dtype2(hid_t file)
if(H5T_INTEGER!=H5Tget_class(mem_id))
TEST_ERROR;
H5Tclose(mem_id);
-
+
/* Read the dataset back. Temporary buffer is for special platforms like
* Cray */
tmp = malloc(DIM0*DIM1*H5Tget_size(native_type));
if((bkg=calloc(sizeof(s1),DIM0*DIM1))==NULL)
TEST_ERROR;
-
+
if (H5Dread(dataset, native_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, tmp)<0)
TEST_ERROR;
@@ -573,7 +573,7 @@ test_compound_dtype(hid_t file)
if(H5Tinsert(tid, "c", 0, H5T_STD_U8LE)<0) TEST_ERROR;
if(H5Tinsert(tid, "i", 1, H5T_STD_U32LE)<0) TEST_ERROR;
if(H5Tinsert(tid, "l", 5, H5T_STD_I64BE)<0) TEST_ERROR;
-
+
/* Create the dataset */
if ((dataset = H5Dcreate(file, DSET_COMPOUND_NAME, tid, space,
H5P_DEFAULT))<0) TEST_ERROR;
@@ -583,7 +583,7 @@ test_compound_dtype(hid_t file)
if(H5Tinsert(tid2, "c", HOFFSET(s1, c), H5T_NATIVE_UCHAR)<0) TEST_ERROR;
if(H5Tinsert(tid2, "i", HOFFSET(s1, i), H5T_NATIVE_UINT)<0) TEST_ERROR;
if(H5Tinsert(tid2, "l", HOFFSET(s1, l), H5T_NATIVE_LLONG)<0) TEST_ERROR;
-
+
/* Write the data to the dataset */
if (H5Dwrite(dataset, tid2, H5S_ALL, H5S_ALL, H5P_DEFAULT, points)<0)
TEST_ERROR;
@@ -592,9 +592,9 @@ test_compound_dtype(hid_t file)
if(H5Dclose(dataset)<0) TEST_ERROR;
/* Close dataspace */
- if(H5Sclose(space)<0) TEST_ERROR;
+ if(H5Sclose(space)<0) TEST_ERROR;
+
-
/* Open dataset again to check H5Tget_native_type */
if((dataset=H5Dopen(file, DSET_COMPOUND_NAME))<0) TEST_ERROR;
@@ -602,54 +602,54 @@ test_compound_dtype(hid_t file)
if((native_type=H5Tget_native_type(dtype, H5T_DIR_DEFAULT))<0)
TEST_ERROR;
-
+
/* Verify the datatype of each field retrieved and converted */
if((mem_id = H5Tget_member_type(native_type, 0))<0)
TEST_ERROR;
- if(H5Tget_order(mem_id) != H5Tget_order(H5T_NATIVE_UCHAR))
+ if(H5Tget_order(mem_id) != H5Tget_order(H5T_NATIVE_UCHAR))
TEST_ERROR;
if(H5Tget_size(mem_id) < H5Tget_size(H5T_STD_U8LE))
TEST_ERROR;
if(H5T_INTEGER!=H5Tget_class(mem_id))
TEST_ERROR;
H5Tclose(mem_id);
-
+
if((mem_id = H5Tget_member_type(native_type, 1))<0)
TEST_ERROR;
- if(H5Tget_order(mem_id) != H5Tget_order(H5T_NATIVE_UINT))
+ if(H5Tget_order(mem_id) != H5Tget_order(H5T_NATIVE_UINT))
TEST_ERROR;
if(H5Tget_size(mem_id) < H5Tget_size(H5T_STD_U32LE))
TEST_ERROR;
if(H5T_INTEGER!=H5Tget_class(mem_id))
TEST_ERROR;
H5Tclose(mem_id);
-
+
if((mem_id = H5Tget_member_type(native_type, 2))<0)
TEST_ERROR;
- if(H5Tget_order(mem_id) != H5Tget_order(H5T_NATIVE_LLONG))
+ if(H5Tget_order(mem_id) != H5Tget_order(H5T_NATIVE_LLONG))
TEST_ERROR;
if(H5Tget_size(mem_id) < H5Tget_size(H5T_STD_I64BE))
TEST_ERROR;
if(H5T_INTEGER!=H5Tget_class(mem_id))
TEST_ERROR;
H5Tclose(mem_id);
-
+
/* Read the dataset back. Temporary buffer is for special platforms like
* Cray */
tmp = malloc(DIM0*DIM1*H5Tget_size(native_type));
bkg = calloc(sizeof(s1),DIM0*DIM1);
-
+
if (H5Dread(dataset, native_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, tmp)<0)
TEST_ERROR;
memcpy(check, tmp, DIM0*DIM1*H5Tget_size(native_type));
free(tmp);
-
+
if (H5Tconvert(native_type, tid2, (DIM0*DIM1), check, bkg, H5P_DEFAULT)<0)
TEST_ERROR;
-
+
free(bkg);
-
+
/* Check that the values read are the same as the values written */
for (i = 0, temp_point=points, temp_check=check; i < DIM0; i++) {
for (j = 0; j < DIM1; j++, temp_point++,temp_check++) {
@@ -709,7 +709,7 @@ test_compound_dtype3(hid_t file)
long_long l;
} s1;
hid_t dataset, space;
- hid_t dtype, native_type, tid, tid2, tid_m, tid_m2,
+ hid_t dtype, native_type, tid, tid2, tid_m, tid_m2,
mem_id, nest_mem_id;
hsize_t array_dims[1]={5};
int i, j, k, n;
@@ -717,7 +717,7 @@ test_compound_dtype3(hid_t file)
s1 *temp_point, *temp_check;
s1 *points=NULL, *check=NULL;
void *tmp, *bkg;
-
+
TESTING("compound datatype with array as field");
/* Allocate space for the points & check arrays */
@@ -740,10 +740,10 @@ test_compound_dtype3(hid_t file)
dims[0] = DIM0;
dims[1] = DIM1;
if ((space = H5Screate_simple(2, dims, NULL))<0) TEST_ERROR;
-
+
/* Create array datatype */
if((tid2=H5Tarray_create(H5T_STD_I32LE, 1, array_dims, NULL))<0) TEST_ERROR;
-
+
/* Create compound datatype for disk storage */
if((tid=H5Tcreate(H5T_COMPOUND, 29))<0) TEST_ERROR;
@@ -751,14 +751,14 @@ test_compound_dtype3(hid_t file)
if(H5Tinsert(tid, "c", 0, H5T_STD_U8LE)<0) TEST_ERROR;
if(H5Tinsert(tid, "a", 1, tid2)<0) TEST_ERROR;
if(H5Tinsert(tid, "l", 21, H5T_STD_I64BE)<0) TEST_ERROR;
-
+
/* Create the dataset */
if ((dataset = H5Dcreate(file, DSET_COMPOUND_NAME_3, tid, space,
H5P_DEFAULT))<0) TEST_ERROR;
/* Create array datatype */
if((tid_m2=H5Tarray_create(H5T_NATIVE_INT, 1, array_dims, NULL))<0) TEST_ERROR;
-
+
/* Create compound datatype for datatype in memory */
if((tid_m=H5Tcreate(H5T_COMPOUND, sizeof(s1)))<0) TEST_ERROR;
if(H5Tinsert(tid_m, "c", HOFFSET(s1, c), H5T_NATIVE_UCHAR)<0) TEST_ERROR;
@@ -777,9 +777,9 @@ test_compound_dtype3(hid_t file)
if(H5Tclose(tid2)<0) TEST_ERROR;
/* Close dataspace */
- if(H5Sclose(space)<0) TEST_ERROR;
+ if(H5Sclose(space)<0) TEST_ERROR;
+
-
/* Open dataset again to check H5Tget_native_type */
if((dataset=H5Dopen(file, DSET_COMPOUND_NAME_3))<0) TEST_ERROR;
@@ -787,19 +787,19 @@ test_compound_dtype3(hid_t file)
if((native_type=H5Tget_native_type(dtype, H5T_DIR_DEFAULT))<0)
TEST_ERROR;
-
+
/* Verify the datatype of each field retrieved and converted */
/* check the char member */
if((mem_id = H5Tget_member_type(native_type, 0))<0)
TEST_ERROR;
- if(H5Tget_order(mem_id) != H5Tget_order(H5T_NATIVE_UCHAR))
+ if(H5Tget_order(mem_id) != H5Tget_order(H5T_NATIVE_UCHAR))
TEST_ERROR;
if(H5Tget_size(mem_id) < H5Tget_size(H5T_STD_U8LE))
TEST_ERROR;
if(H5T_INTEGER!=H5Tget_class(mem_id))
TEST_ERROR;
H5Tclose(mem_id);
-
+
/* check the array member */
if((mem_id = H5Tget_member_type(native_type, 1))<0)
TEST_ERROR;
@@ -807,7 +807,7 @@ test_compound_dtype3(hid_t file)
TEST_ERROR;
if((nest_mem_id = H5Tget_super(mem_id))<0)
TEST_ERROR;
- if(H5Tget_order(nest_mem_id) != H5Tget_order(H5T_NATIVE_INT))
+ if(H5Tget_order(nest_mem_id) != H5Tget_order(H5T_NATIVE_INT))
TEST_ERROR;
if(H5Tget_size(nest_mem_id) < H5Tget_size(H5T_STD_I32LE))
TEST_ERROR;
@@ -815,24 +815,24 @@ test_compound_dtype3(hid_t file)
TEST_ERROR;
H5Tclose(nest_mem_id);
H5Tclose(mem_id);
-
+
/* check the long long member */
if((mem_id = H5Tget_member_type(native_type, 2))<0)
TEST_ERROR;
- if(H5Tget_order(mem_id) != H5Tget_order(H5T_NATIVE_LLONG))
+ if(H5Tget_order(mem_id) != H5Tget_order(H5T_NATIVE_LLONG))
TEST_ERROR;
if(H5Tget_size(mem_id) < H5Tget_size(H5T_STD_I64BE))
TEST_ERROR;
if(H5T_INTEGER!=H5Tget_class(mem_id))
TEST_ERROR;
H5Tclose(mem_id);
-
+
/* Read the dataset back. Temporary buffer is for special platforms like
* Cray */
tmp = malloc(DIM0*DIM1*H5Tget_size(native_type));
if((bkg=calloc(sizeof(s1),DIM0*DIM1))==NULL)
TEST_ERROR;
-
+
if (H5Dread(dataset, native_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, tmp)<0)
TEST_ERROR;
@@ -916,7 +916,7 @@ test_compound_opaque(hid_t file)
s1 *temp_point, *temp_check;
s1 *points=NULL, *check=NULL;
void *tmp, *bkg;
-
+
TESTING("compound datatype with opaque field");
/* Allocate space for the points & check arrays */
@@ -939,11 +939,11 @@ test_compound_opaque(hid_t file)
dims[0] = DIM0;
dims[1] = DIM1;
if ((space = H5Screate_simple(2, dims, NULL))<0) TEST_ERROR;
-
+
/* Create opaque datatype */
if((tid2=H5Tcreate(H5T_OPAQUE, sizeof(temp_point->o)))<0) TEST_ERROR;
if(H5Tset_tag(tid2, "testing opaque field")<0) TEST_ERROR;
-
+
/* Create compound datatype for disk storage */
if((tid=H5Tcreate(H5T_COMPOUND, 14))<0) TEST_ERROR;
@@ -951,7 +951,7 @@ test_compound_opaque(hid_t file)
if(H5Tinsert(tid, "c", 0, H5T_STD_U8LE)<0) TEST_ERROR;
if(H5Tinsert(tid, "o", 1, tid2)<0) TEST_ERROR;
if(H5Tinsert(tid, "l", 6, H5T_STD_I64BE)<0) TEST_ERROR;
-
+
/* Create the dataset */
if ((dataset = H5Dcreate(file, DSET_COMPOUND_NAME_4, tid, space,
H5P_DEFAULT))<0) TEST_ERROR;
@@ -974,9 +974,9 @@ test_compound_opaque(hid_t file)
if(H5Tclose(tid2)<0) TEST_ERROR;
/* Close dataspace */
- if(H5Sclose(space)<0) TEST_ERROR;
+ if(H5Sclose(space)<0) TEST_ERROR;
+
-
/* Open dataset again to check H5Tget_native_type */
if((dataset=H5Dopen(file, DSET_COMPOUND_NAME_4))<0) TEST_ERROR;
@@ -984,19 +984,19 @@ test_compound_opaque(hid_t file)
if((native_type=H5Tget_native_type(dtype, H5T_DIR_DEFAULT))<0)
TEST_ERROR;
-
+
/* Verify the datatype of each field retrieved and converted */
/* check the char member */
if((mem_id = H5Tget_member_type(native_type, 0))<0)
TEST_ERROR;
- if(H5Tget_order(mem_id) != H5Tget_order(H5T_NATIVE_UCHAR))
+ if(H5Tget_order(mem_id) != H5Tget_order(H5T_NATIVE_UCHAR))
TEST_ERROR;
if(H5Tget_size(mem_id) < H5Tget_size(H5T_STD_U8LE))
TEST_ERROR;
if(H5T_INTEGER!=H5Tget_class(mem_id))
TEST_ERROR;
H5Tclose(mem_id);
-
+
/* check the array member */
if((mem_id = H5Tget_member_type(native_type, 1))<0)
TEST_ERROR;
@@ -1005,24 +1005,24 @@ test_compound_opaque(hid_t file)
if(H5Tget_size(mem_id) != sizeof(temp_point->o))
TEST_ERROR;
H5Tclose(mem_id);
-
+
/* check the long long member */
if((mem_id = H5Tget_member_type(native_type, 2))<0)
TEST_ERROR;
- if(H5Tget_order(mem_id) != H5Tget_order(H5T_NATIVE_LLONG))
+ if(H5Tget_order(mem_id) != H5Tget_order(H5T_NATIVE_LLONG))
TEST_ERROR;
if(H5Tget_size(mem_id) < H5Tget_size(H5T_STD_I64BE))
TEST_ERROR;
if(H5T_INTEGER!=H5Tget_class(mem_id))
TEST_ERROR;
H5Tclose(mem_id);
-
+
/* Read the dataset back. Temporary buffer is for special platforms like
* Cray */
tmp = HDmalloc(DIM0*DIM1*H5Tget_size(native_type));
if((bkg=HDcalloc(sizeof(s1),DIM0*DIM1))==NULL)
TEST_ERROR;
-
+
if (H5Dread(dataset, native_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, tmp)<0)
TEST_ERROR;
@@ -1121,7 +1121,7 @@ test_enum_dtype(hid_t file)
dims[1] = DIM1;
if ((space = H5Screate_simple(2, dims, NULL))<0) TEST_ERROR;
- /* Construct enum type based on native type */
+ /* Construct enum type based on native type */
if((tid=H5Tenum_create(H5T_STD_I16LE))<0) TEST_ERROR;
for (i = 0; i < 8; i++) {
@@ -1129,19 +1129,19 @@ test_enum_dtype(hid_t file)
sub_colors[i*2+1]=0;
if(H5Tenum_insert(tid, mname[i], &(sub_colors[i*2]))<0) TEST_ERROR;
}
-
+
/* Create the dataset */
if ((dataset = H5Dcreate(file, DSET_ENUM_NAME, tid, space,
H5P_DEFAULT))<0) TEST_ERROR;
- /* Construct enum type based on native type in memory */
+ /* Construct enum type based on native type in memory */
if((tid_m=H5Tenum_create(H5T_NATIVE_SHORT))<0) TEST_ERROR;
for (i = 0; i < 8; i++) {
colors[i] = i;
if(H5Tenum_insert(tid_m, mname[i], &(colors[i]))<0) TEST_ERROR;
}
-
+
/* Write the data to the dataset */
if (H5Dwrite(dataset, tid_m, H5S_ALL, H5S_ALL, H5P_DEFAULT, spoints2)<0)
TEST_ERROR;
@@ -1151,28 +1151,28 @@ test_enum_dtype(hid_t file)
/* Close datatype */
if(H5Tclose(tid)<0) TEST_ERROR;
-
+
/* Close dataspace */
- if(H5Sclose(space)<0) TEST_ERROR;
+ if(H5Sclose(space)<0) TEST_ERROR;
/* Open dataset again to check H5Tget_native_type */
if((dataset=H5Dopen(file, DSET_ENUM_NAME))<0) TEST_ERROR;
if((dtype=H5Dget_type(dataset))<0) TEST_ERROR;
-
+
if((native_type=H5Tget_native_type(dtype, H5T_DIR_DEFAULT))<0)
TEST_ERROR;
-
+
/* Read the dataset back. Temporary buffer is for special platforms like
* Cray */
tmp = malloc(DIM0*DIM1*H5Tget_size(native_type));
-
+
if (H5Dread(dataset, native_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, tmp)<0)
TEST_ERROR;
memcpy(scheck2, tmp, DIM0*DIM1*H5Tget_size(native_type));
free(tmp);
-
+
if (H5Tconvert(native_type, tid_m, (DIM0*DIM1), scheck2, NULL, H5P_DEFAULT)<0)
TEST_ERROR;
@@ -1183,7 +1183,7 @@ test_enum_dtype(hid_t file)
H5_FAILED();
printf(" Read different values than written.\n");
printf(" At index %d,%d\n", i, j);
- printf(" spoints2[i][j]=%hd, scheck2[i][j]=%hd\n", spoints2[i][j],
+ printf(" spoints2[i][j]=%hd, scheck2[i][j]=%hd\n", spoints2[i][j],
scheck2[i][j]);
goto error;
}
@@ -1233,7 +1233,7 @@ test_array_dtype(hid_t file)
s1 *temp_point, *temp_check;
s1 *points=NULL, *check=NULL;
void *tmp;
-
+
TESTING("array of compound datatype");
/* Allocate space for the points & check arrays */
@@ -1263,10 +1263,10 @@ test_array_dtype(hid_t file)
if(H5Tinsert(tid2, "c", 0, H5T_STD_U8BE)<0) TEST_ERROR;
if(H5Tinsert(tid2, "i", 1, H5T_STD_U32LE)<0) TEST_ERROR;
if(H5Tinsert(tid2, "l", 5, H5T_STD_I64BE)<0) TEST_ERROR;
-
+
/* Create array datatype for disk storage */
if((tid=H5Tarray_create(tid2, 1, array_dims, NULL))<0) TEST_ERROR;
-
+
/* Create the dataset */
if ((dataset = H5Dcreate(file, DSET_ARRAY_NAME, tid, space,
H5P_DEFAULT))<0) TEST_ERROR;
@@ -1276,33 +1276,33 @@ test_array_dtype(hid_t file)
if(H5Tinsert(tid3, "c", HOFFSET(s1, c), H5T_NATIVE_UCHAR)<0) TEST_ERROR;
if(H5Tinsert(tid3, "i", HOFFSET(s1, i), H5T_NATIVE_UINT)<0) TEST_ERROR;
if(H5Tinsert(tid3, "l", HOFFSET(s1, l), H5T_NATIVE_LLONG)<0) TEST_ERROR;
-
+
/* Create array datatype for memory */
if((tid_m=H5Tarray_create(tid3, 1, array_dims, NULL))<0) TEST_ERROR;
-
+
/* Write the data to the dataset */
if (H5Dwrite(dataset, tid_m, H5S_ALL, H5S_ALL, H5P_DEFAULT, points)<0)
TEST_ERROR;
/* Close dataset */
if(H5Dclose(dataset)<0) TEST_ERROR;
-
+
/* Close datatype */
if(H5Tclose(tid)<0) TEST_ERROR;
if(H5Tclose(tid2)<0) TEST_ERROR;
/* Close dataspace */
- if(H5Sclose(space)<0) TEST_ERROR;
+ if(H5Sclose(space)<0) TEST_ERROR;
/* Open dataset again to check H5Tget_native_type */
if((dataset=H5Dopen(file, DSET_ARRAY_NAME))<0) TEST_ERROR;
if((dtype=H5Dget_type(dataset))<0) TEST_ERROR;
-
+
if((native_type=H5Tget_native_type(dtype, H5T_DIR_DEFAULT))<0)
TEST_ERROR;
- /* Read the dataset back. Temporary buffer is for special platforms like
+ /* Read the dataset back. Temporary buffer is for special platforms like
* Cray */
tmp = malloc(DIM0*DIM1*H5Tget_size(native_type));
@@ -1311,7 +1311,7 @@ test_array_dtype(hid_t file)
memcpy(check, tmp, DIM0*DIM1*H5Tget_size(native_type));
free(tmp);
-
+
if (H5Tconvert(native_type, tid_m, (DIM0*DIM1), check, NULL, H5P_DEFAULT)<0)
TEST_ERROR;
@@ -1384,7 +1384,7 @@ test_array_dtype2(hid_t file)
/* Initialize the dataset */
for(i = n = 0;i < DIM0; i++)
for(j = 0; j < DIM1; j++)
- for(k = 0; k < 5; k++)
+ for(k = 0; k < 5; k++)
ipoints3[i][j][k] = n++;
/* Create the data space */
@@ -1394,40 +1394,40 @@ test_array_dtype2(hid_t file)
/* Create array datatype for disk storage */
if((tid=H5Tarray_create(H5T_STD_I32LE, 1, array_dims, NULL))<0) TEST_ERROR;
-
+
/* Create the dataset */
if ((dataset = H5Dcreate(file, DSET_ARRAY2_NAME, tid, space,
H5P_DEFAULT))<0) TEST_ERROR;
/* Create array datatype for memory */
if((tid_m=H5Tarray_create(H5T_NATIVE_INT, 1, array_dims, NULL))<0) TEST_ERROR;
-
+
/* Write the data to the dataset */
if (H5Dwrite(dataset, tid_m, H5S_ALL, H5S_ALL, H5P_DEFAULT, ipoints3)<0)
TEST_ERROR;
/* Close dataset */
if(H5Dclose(dataset)<0) TEST_ERROR;
-
+
/* Close datatype */
if(H5Tclose(tid)<0) TEST_ERROR;
/* Close dataspace */
- if(H5Sclose(space)<0) TEST_ERROR;
+ if(H5Sclose(space)<0) TEST_ERROR;
/* Open dataset again to check H5Tget_native_type */
if((dataset=H5Dopen(file, DSET_ARRAY2_NAME))<0) TEST_ERROR;
if((dtype=H5Dget_type(dataset))<0) TEST_ERROR;
-
+
if((native_type=H5Tget_native_type(dtype, H5T_DIR_DEFAULT))<0)
TEST_ERROR;
/* Read the dataset back. Temporary buffer is for special platforms like
* Cray */
tmp = malloc(DIM0*DIM1*H5Tget_size(native_type));
-
+
if (H5Dread(dataset, native_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, tmp)<0)
TEST_ERROR;
@@ -1481,7 +1481,7 @@ error:
*
*-------------------------------------------------------------------------
*/
-static herr_t
+static herr_t
test_vl_dtype(hid_t file)
{
hvl_t wdata[SPACE1_DIM1]; /* Information to write */
@@ -1492,7 +1492,7 @@ test_vl_dtype(hid_t file)
hid_t dtype, native_type, nat_super_type, tid, tid2, tid_m, tid_m2;
size_t i, j, k;
void* *tmp;
-
+
TESTING("variable length datatype");
/* Allocate and initialize VL data to write */
@@ -1517,7 +1517,7 @@ test_vl_dtype(hid_t file)
}
} /* end for */
} /* end for */
-
+
/* Create dataspace for datasets */
if((space = H5Screate_simple(SPACE1_RANK, dims1, NULL))<0) TEST_ERROR;
@@ -1526,17 +1526,17 @@ test_vl_dtype(hid_t file)
/* Create a VL datatype for disk storage */
tid = H5Tvlen_create (tid2);
-
+
/* Create a dataset */
if((dataset=H5Dcreate(file, DSET_VL_NAME, tid, space, H5P_DEFAULT))<0)
TEST_ERROR;
/* Create a base VL datatype for memory */
if((tid_m2 = H5Tvlen_create (H5T_NATIVE_UINT))<0) TEST_ERROR;
-
+
/* Create a VL datatype for memory */
if((tid_m = H5Tvlen_create (tid_m2))<0) TEST_ERROR;
-
+
/* Write dataset to disk */
if(H5Dwrite(dataset,tid_m,H5S_ALL,H5S_ALL,H5P_DEFAULT,wdata)<0) TEST_ERROR;
@@ -1552,11 +1552,11 @@ test_vl_dtype(hid_t file)
/* Get native datatype for dataset */
if((dtype = H5Dget_type(dataset))<0) TEST_ERROR;
-
+
if((native_type=H5Tget_native_type(dtype, H5T_DIR_DEFAULT))<0)
TEST_ERROR;
-
- /* Also get native base type for this nested VL type. Should be an integer type. */
+
+ /* Also get native base type for this nested VL type. Should be an integer type. */
if((nat_super_type=H5Tget_super(native_type))<0)
TEST_ERROR;
if((nat_super_type=H5Tget_super(nat_super_type))<0)
@@ -1564,7 +1564,7 @@ test_vl_dtype(hid_t file)
/* Read dataset from disk */
if(H5Dread(dataset,native_type,H5S_ALL,H5S_ALL,H5P_DEFAULT,rdata)<0) TEST_ERROR;
-
+
/* Compare data read in */
for(i=0; i<SPACE1_DIM1; i++) {
if(wdata[i].len!=rdata[i].len) {
@@ -1580,7 +1580,7 @@ test_vl_dtype(hid_t file)
} /* end if */
/* use temporary buffer to convert datatype. This is for special
- * platforms like Cray */
+ * platforms like Cray */
tmp=malloc(t2->len*sizeof(unsigned int));
memcpy(tmp, t2->p, t2->len*H5Tget_size(nat_super_type));
@@ -1595,7 +1595,7 @@ test_vl_dtype(hid_t file)
goto error;
}
} /* end for */
-
+
free(tmp);
} /* end for */
} /* end for */
@@ -1614,11 +1614,11 @@ test_vl_dtype(hid_t file)
if(H5Tclose(dtype)<0) TEST_ERROR;
if(H5Tclose(tid_m)<0) TEST_ERROR;
if(H5Tclose(tid_m2)<0) TEST_ERROR;
-
+
/* Close disk dataspace */
if(H5Sclose(space)<0) TEST_ERROR;
-
+
PASSED();
return 0;
@@ -1643,7 +1643,7 @@ test_vl_dtype(hid_t file)
*
*-------------------------------------------------------------------------
*/
-static herr_t
+static herr_t
test_vlstr_dtype(hid_t file)
{
const char *wdata[SPACE1_DIM1]= {
@@ -1671,7 +1671,7 @@ test_vlstr_dtype(hid_t file)
if(H5Tset_size (tid1,H5T_VARIABLE)<0) TEST_ERROR;
if(H5T_STRING!=H5Tget_class(tid1) || !H5Tis_variable_str(tid1))
TEST_ERROR;
-
+
/* Create a dataset */
if((dataset=H5Dcreate(file,DSET_VLSTR_NAME,tid1,sid1,H5P_DEFAULT))<0) TEST_ERROR;
@@ -1692,7 +1692,7 @@ test_vlstr_dtype(hid_t file)
TEST_ERROR;
/* Check if the data type is equal */
- if(!H5Tequal(native_type, tid1))
+ if(!H5Tequal(native_type, tid1))
TEST_ERROR;
/* Read dataset from disk */
@@ -1723,16 +1723,16 @@ test_vlstr_dtype(hid_t file)
/* Close disk dataspace */
if(H5Sclose(sid1)<0) TEST_ERROR;
-
+
/* Free memory for rdata */
for(i=0; i<SPACE1_DIM1; i++) {
HDfree(rdata[i]);
}
-
- PASSED();
- return 0;
-
-error:
+
+ PASSED();
+ return 0;
+
+error:
return -1;
} /* end test_vlstr_dtype() */
@@ -1753,7 +1753,7 @@ error:
*
*-------------------------------------------------------------------------
*/
-static herr_t
+static herr_t
test_str_dtype(hid_t file)
{
const char wdata[SPACE1_DIM1][4]= {
@@ -1781,7 +1781,7 @@ test_str_dtype(hid_t file)
if(H5Tset_size (tid1,4)<0) TEST_ERROR;
if(H5T_STRING!=H5Tget_class(tid1))
TEST_ERROR;
-
+
/* Create a dataset */
if((dataset=H5Dcreate(file,DSET_STR_NAME,tid1,sid1,H5P_DEFAULT))<0) TEST_ERROR;
@@ -1802,7 +1802,7 @@ test_str_dtype(hid_t file)
TEST_ERROR;
/* Check if the data type is equal */
- if(!H5Tequal(native_type, tid1) || H5T_STRING!=H5Tget_class(native_type))
+ if(!H5Tequal(native_type, tid1) || H5T_STRING!=H5Tget_class(native_type))
TEST_ERROR;
/* Read dataset from disk */
@@ -1833,11 +1833,11 @@ test_str_dtype(hid_t file)
/* Close disk dataspace */
if(H5Sclose(sid1)<0) TEST_ERROR;
-
- PASSED();
- return 0;
-
-error:
+
+ PASSED();
+ return 0;
+
+error:
return -1;
} /* end test_str_dtype() */
@@ -1860,7 +1860,7 @@ error:
*
*-------------------------------------------------------------------------
*/
-static herr_t
+static herr_t
test_refer_dtype(hid_t file)
{
@@ -1881,13 +1881,13 @@ test_refer_dtype(hid_t file)
/* Output message about test being performed */
TESTING("reference datatype");
-
+
/* Allocate write & read buffers */
wbuf=HDmalloc(MAX(sizeof(unsigned),sizeof(hobj_ref_t)));
rbuf=HDmalloc(MAX(sizeof(unsigned),sizeof(hobj_ref_t)));
/* Create dataspace for datasets */
- if((sid1 = H5Screate_simple(SPACE1_RANK, dims1, NULL))<0)
+ if((sid1 = H5Screate_simple(SPACE1_RANK, dims1, NULL))<0)
TEST_ERROR;
/* Create a group */
@@ -1909,7 +1909,7 @@ test_refer_dtype(hid_t file)
TEST_ERROR;
/* Save datatype for later */
- if(H5Tcommit (group, "Datatype1", tid1)<0)
+ if(H5Tcommit (group, "Datatype1", tid1)<0)
TEST_ERROR;
/* Close datatype */
@@ -1917,7 +1917,7 @@ test_refer_dtype(hid_t file)
TEST_ERROR;
/* Close group */
- if(H5Gclose(group)<0)
+ if(H5Gclose(group)<0)
TEST_ERROR;
/* Create a dataset */
@@ -1925,7 +1925,7 @@ test_refer_dtype(hid_t file)
TEST_ERROR;
/* Create reference to named datatype */
- if(H5Rcreate(wbuf,file,"/Group1/Datatype1",H5R_OBJECT,-1)<0)
+ if(H5Rcreate(wbuf,file,"/Group1/Datatype1",H5R_OBJECT,-1)<0)
TEST_ERROR;
if(H5Rget_obj_type(dataset,H5R_OBJECT,wbuf)!=H5G_TYPE)
TEST_ERROR;
@@ -1937,7 +1937,7 @@ test_refer_dtype(hid_t file)
/* Close disk dataspace */
if(H5Sclose(sid1)<0)
TEST_ERROR;
-
+
/* Close Dataset */
if(H5Dclose(dataset)<0)
TEST_ERROR;
@@ -1958,7 +1958,7 @@ test_refer_dtype(hid_t file)
/* Check if the data type is equal */
if(!H5Tequal(native_type, H5T_STD_REF_OBJ))
TEST_ERROR;
-
+
/* Read selection from disk */
if(H5Dread(dataset,native_type,H5S_ALL,H5S_ALL,H5P_DEFAULT,rbuf)<0)
TEST_ERROR;
@@ -1997,7 +1997,7 @@ error:
/*-------------------------------------------------------------------------
* Function: test_refer_dtype2
*
- * Purpose: Test H5Tget_native_type for reference
+ * Purpose: Test H5Tget_native_type for reference
*
* Return: Success: 0
*
@@ -2010,7 +2010,7 @@ error:
*
*-------------------------------------------------------------------------
*/
-static herr_t
+static herr_t
test_refer_dtype2(hid_t file)
{
hid_t dset1, /* Dataset ID */
@@ -2065,7 +2065,7 @@ test_refer_dtype2(hid_t file)
/* Create a reference dataset */
if((dset1=H5Dcreate(file,"Dataset1",H5T_STD_REF_DSETREG,sid1,H5P_DEFAULT))<0)
TEST_ERROR;
-
+
/* Create references */
/* Select 6x6 hyperslab for first reference */
start[0]=2; start[1]=2;
@@ -2092,7 +2092,7 @@ test_refer_dtype2(hid_t file)
/* Close disk dataspace */
if(H5Sclose(sid1)<0)
TEST_ERROR;
-
+
/* Close Dataset */
if(H5Dclose(dset1)<0)
TEST_ERROR;
@@ -2100,7 +2100,7 @@ test_refer_dtype2(hid_t file)
/* Close uint8 dataset dataspace */
if(H5Sclose(sid2)<0)
TEST_ERROR;
-
+
@@ -2156,7 +2156,7 @@ test_refer_dtype2(hid_t file)
TEST_ERROR;
if((int)H5Sget_select_hyper_nblocks(sid2) != 1)
TEST_ERROR;
-
+
/* Close region space */
if(H5Sclose(sid2)<0)
TEST_ERROR;
@@ -2177,10 +2177,10 @@ test_refer_dtype2(hid_t file)
free(dwbuf);
free(drbuf);
- PASSED();
- return 0;
-
-error:
+ PASSED();
+ return 0;
+
+error:
return -1;
} /* test_refer_dtype2() */
@@ -2209,7 +2209,7 @@ test_opaque_dtype(hid_t file)
size_t i;
unsigned char wbuf[32], rbuf[32];
hsize_t nelmts;
-
+
TESTING("opaque datatype");
/* opaque_1 */
@@ -2233,7 +2233,7 @@ test_opaque_dtype(hid_t file)
if((dataset=H5Dopen(file, DSET_OPAQUE_NAME))<0) TEST_ERROR;
if((dtype=H5Dget_type(dataset))<0) TEST_ERROR;
-
+
if((native_type=H5Tget_native_type(dtype, H5T_DIR_DEFAULT))<0)
TEST_ERROR;
@@ -2241,7 +2241,7 @@ test_opaque_dtype(hid_t file)
if (H5Dread(dataset, native_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf)<0)
TEST_ERROR;
-
+
for(i=0; i<sizeof(rbuf); i++) {
if (rbuf[i] != wbuf[i]) {
H5_FAILED();
@@ -2250,16 +2250,16 @@ test_opaque_dtype(hid_t file)
goto error;
}
}
-
+
if (H5Tclose(type)<0) TEST_ERROR;
if (H5Tclose(dtype)<0) TEST_ERROR;
if (H5Tclose(native_type)<0) TEST_ERROR;
if (H5Dclose(dataset)<0) TEST_ERROR;
- PASSED();
- return 0;
-
-error:
+ PASSED();
+ return 0;
+
+error:
return -1;
} /* test_opaque_dtype */
@@ -2288,7 +2288,7 @@ test_bitfield_dtype(hid_t file)
size_t i;
unsigned char wbuf[32];
hsize_t nelmts;
-
+
TESTING("bitfield datatype");
/* opaque_1 */
@@ -2311,7 +2311,7 @@ test_bitfield_dtype(hid_t file)
if((dataset=H5Dopen(file, DSET_BITFIELD_NAME))<0) TEST_ERROR;
if((dtype=H5Dget_type(dataset))<0) TEST_ERROR;
-
+
H5E_BEGIN_TRY {
native_type=H5Tget_native_type(dtype, H5T_DIR_DEFAULT);
} H5E_END_TRY;
@@ -2325,10 +2325,10 @@ test_bitfield_dtype(hid_t file)
if (H5Tclose(dtype)<0) TEST_ERROR;
if (H5Dclose(dataset)<0) TEST_ERROR;
- PASSED();
- return 0;
-
-error:
+ PASSED();
+ return 0;
+
+error:
return -1;
} /* test_bitfield_dtype */
@@ -2349,7 +2349,7 @@ error:
* September 3, 2004
*
* Modifications:
- *
+ *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -2359,7 +2359,7 @@ test_ninteger(void)
hid_t fid2=(-1); /* file ID */
hid_t did1=(-1); /* dataset ID */
hid_t did2=(-1); /* dataset ID */
- hid_t sid1=(-1); /* dataspace ID */
+ hid_t sid1=(-1); /* dataspace ID */
hid_t dcpl1=(-1); /* dataset creation property list ID */
hid_t dcpl2=(-1); /* dataset creation property list ID */
hid_t tid1=(-1); /* file datatype */
@@ -2372,19 +2372,19 @@ test_ninteger(void)
int buf[DIM3];
int chk[DIM3];
int i;
-
+
for (i=0; i<DIM3; i++){
buf[i]=i;
}
-
+
TESTING("native integer ");
/*-------------------------------------------------------------------------
- * step1: create a file
+ * step1: create a file
*-------------------------------------------------------------------------
- */
+ */
/* create a file using default properties */
- if ((fid1=H5Fcreate("tstint1.h5",H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT))<0)
+ if ((fid1=H5Fcreate("tstint1.h5",H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT))<0)
goto error;
/* create a data space */
@@ -2392,7 +2392,7 @@ test_ninteger(void)
/* create dcpl */
if((dcpl1 = H5Pcreate(H5P_DATASET_CREATE))<0) goto error;
-
+
/* create a dataset */
if ((did1 = H5Dcreate(fid1,"dset",H5T_NATIVE_INT,sid1,dcpl1)) <0) goto error;
@@ -2409,25 +2409,25 @@ test_ninteger(void)
/*-------------------------------------------------------------------------
* step 2: open and create another file copying the data from file1
*-------------------------------------------------------------------------
- */
-
+ */
+
/* open */
- if ((fid1=H5Fopen("tstint1.h5",H5F_ACC_RDONLY,H5P_DEFAULT))<0)
+ if ((fid1=H5Fopen("tstint1.h5",H5F_ACC_RDONLY,H5P_DEFAULT))<0)
goto error;
/* open dataset */
- if ((did1=H5Dopen(fid1,"dset"))<0)
+ if ((did1=H5Dopen(fid1,"dset"))<0)
goto error;
-
- if ((sid1=H5Dget_space(did1))<0)
+
+ if ((sid1=H5Dget_space(did1))<0)
goto error;
/* get dcpl */
- if ((dcpl1=H5Dget_create_plist(did1))<0)
+ if ((dcpl1=H5Dget_create_plist(did1))<0)
goto error;
/* get file datatype */
- if ((tid1=H5Dget_type (did1))<0)
+ if ((tid1=H5Dget_type (did1))<0)
goto error;
/* get native datatype */
@@ -2447,15 +2447,15 @@ test_ninteger(void)
if (H5Sget_simple_extent_dims(sid1,dims,NULL)<0)
goto error;
nelmts=1;
- for (i=0; i<rank; i++)
+ for (i=0; i<rank; i++)
nelmts*=dims[i];
-
+
/* read */
if (H5Dread(did1,nid1,H5S_ALL,H5S_ALL,H5P_DEFAULT,chk)<0)
goto error;
/* create a file using default properties */
- if ((fid2=H5Fcreate("tstint2.h5",H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT))<0)
+ if ((fid2=H5Fcreate("tstint2.h5",H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT))<0)
goto error;
/* create a dataset using the native type */
@@ -2466,11 +2466,11 @@ test_ninteger(void)
goto error;
/* get dcpl */
- if ((dcpl2=H5Dget_create_plist(did2))<0)
+ if ((dcpl2=H5Dget_create_plist(did2))<0)
goto error;
/* get file datatype */
- if ((tid2=H5Dget_type (did2))<0)
+ if ((tid2=H5Dget_type (did2))<0)
goto error;
/* get native datatype */
@@ -2498,7 +2498,7 @@ test_ninteger(void)
goto error;
}
}
-
+
/* close */
if (H5Sclose (sid1)<0) goto error;
if (H5Pclose (dcpl1)<0) goto error;
@@ -2511,11 +2511,11 @@ test_ninteger(void)
if (H5Dclose (did2)<0) goto error;
if (H5Fclose (fid1)<0) goto error;
if (H5Fclose (fid2)<0) goto error;
-
-
+
+
PASSED();
return 0;
-
+
error:
H5E_BEGIN_TRY {
H5Pclose(dcpl1);
@@ -2556,7 +2556,7 @@ main(void)
h5_reset();
fapl = h5_fileaccess();
-
+
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0)
goto error;
diff --git a/test/ohdr.c b/test/ohdr.c
index cd59a35..da65633 100644
--- a/test/ohdr.c
+++ b/test/ohdr.c
@@ -43,11 +43,11 @@ const char *FILENAME[] = {
/*-------------------------------------------------------------------------
* Function: main
*
- * Purpose:
+ * Purpose:
*
- * Return: Success:
+ * Return: Success:
*
- * Failure:
+ * Failure:
*
* Programmer: Robb Matzke
* Tuesday, November 24, 1998
@@ -172,7 +172,7 @@ main(void)
goto error;
}
PASSED();
-
+
/*
* Test modification of the second message with a symbol table.
*/
@@ -272,7 +272,7 @@ main(void)
goto error;
}
PASSED();
-
+
/* release resources */
TESTING("object header closing");
diff --git a/test/pool.c b/test/pool.c
index 5170c77..2151385 100644
--- a/test/pool.c
+++ b/test/pool.c
@@ -730,9 +730,9 @@ error:
*
* Purpose: Test the memory pool code
*
- * Return: Success:
+ * Return: Success:
*
- * Failure:
+ * Failure:
*
* Programmer: Quincey Koziol
* Tuesday, May 3, 2005
diff --git a/test/reserved.c b/test/reserved.c
index d08c02d..d664a36 100755
--- a/test/reserved.c
+++ b/test/reserved.c
@@ -178,8 +178,8 @@ rsrv_ohdr(void)
if( file_id < 0) TEST_ERROR;
/* Create the data space for the dataset. */
- dims[0] = 4;
- dims[1] = 6;
+ dims[0] = 4;
+ dims[1] = 6;
dataspace_id = H5Screate_simple(2, dims, NULL);
if( dataspace_id < 0) TEST_ERROR;
@@ -207,7 +207,7 @@ rsrv_ohdr(void)
if(status < 0)
break;
- }
+ }
/* The loop should have broken before completing--the file should not have had
* enough address space to hold 2000 attributes (or this test needs to be updated
@@ -265,7 +265,7 @@ rsrv_ohdr(void)
* enough file address space exists before writing.
* This function does this by creating a dataset containing
* variable length data past the limit of the file, then
- * ensuring that an error (not an assert) was generated and
+ * ensuring that an error (not an assert) was generated and
* that the file is readable.
*
* Return: Success: 0
@@ -308,7 +308,7 @@ rsrv_vlen(void)
if( file_id < 0) TEST_ERROR;
/* Create the data space for the dataset. */
- dims[0] = 2000;
+ dims[0] = 2000;
dataspace_id = H5Screate_simple(1, dims, NULL);
if( dataspace_id < 0) TEST_ERROR;
@@ -327,13 +327,13 @@ rsrv_vlen(void)
/* Create a memory dataspace for writing */
dims[0] = 1;
- mem_space_id = H5Screate_simple(1, dims, NULL);
+ mem_space_id = H5Screate_simple(1, dims, NULL);
if( mem_space_id < 0) TEST_ERROR;
/* Create a selection to write to */
start[0] = 0;
count[0] = 1;
- if( H5Sselect_hyperslab(dataspace_id, H5S_SELECT_SET,
+ if( H5Sselect_hyperslab(dataspace_id, H5S_SELECT_SET,
start, NULL, count, NULL) < 0) TEST_ERROR;
for (i = 0; i< 2000; i++)
@@ -341,7 +341,7 @@ rsrv_vlen(void)
vlen_data.len = (i%20) + 1;
offset[0] = i;
- if( H5Soffset_simple(dataspace_id, offset) <0) TEST_ERROR;
+ if( H5Soffset_simple(dataspace_id, offset) <0) TEST_ERROR;
H5E_BEGIN_TRY
status = H5Dwrite(dataset_id, type_id, mem_space_id, dataspace_id, H5P_DEFAULT, &vlen_data);
@@ -349,7 +349,7 @@ rsrv_vlen(void)
if(status < 0)
break;
- }
+ }
/* The loop should have broken before completing--the file should not have had
* enough address space to hold 2000 attributes (or this test needs to be updated!).
@@ -406,11 +406,11 @@ rsrv_vlen(void)
/*-------------------------------------------------------------------------
* Function: main
*
- * Purpose:
+ * Purpose:
*
- * Return: Success:
+ * Return: Success:
*
- * Failure:
+ * Failure:
*
* Programmer: Nat Furrer and James Laird
* Thursday, July 1, 2004
diff --git a/test/set_extent.c b/test/set_extent.c
index 845d621..7844625 100644
--- a/test/set_extent.c
+++ b/test/set_extent.c
@@ -26,7 +26,7 @@
/*-------------------------------------------------------------------------
*
- * Tests the function H5Dset_extent. In the current version of the library
+ * Tests the function H5Dset_extent. In the current version of the library
* the dataset MUST be chunked.
*
*-------------------------------------------------------------------------
@@ -41,7 +41,7 @@ int main( void )
hid_t file_id;
hid_t dataset_id=(-1);
- hid_t space_id=(-1);
+ hid_t space_id=(-1);
hid_t plist_id=(-1);
hid_t fcpl; /* File creation property list */
hsize_t dims[RANK] = { 90, 90 };
@@ -92,7 +92,7 @@ int main( void )
if (H5Dwrite( dataset_id , H5T_NATIVE_INT, space_id, H5S_ALL, H5P_DEFAULT, data )<0) TEST_ERROR;
/*-------------------------------------------------------------------------
- * Set new dimensions for the array; shrink it
+ * Set new dimensions for the array; shrink it
*-------------------------------------------------------------------------
*/
@@ -129,7 +129,7 @@ int main( void )
/*-------------------------------------------------------------------------
- * Set new dimensions for the array; expand it again
+ * Set new dimensions for the array; expand it again
*-------------------------------------------------------------------------
*/
@@ -198,7 +198,7 @@ int main( void )
if (H5Dwrite( dataset_id , H5T_NATIVE_INT, space_id, H5S_ALL, H5P_DEFAULT, data )<0) TEST_ERROR;
/*-------------------------------------------------------------------------
- * Set new dimensions for the array; shrink it
+ * Set new dimensions for the array; shrink it
*-------------------------------------------------------------------------
*/
@@ -230,7 +230,7 @@ int main( void )
/*-------------------------------------------------------------------------
- * Set new dimensions for the array; expand it again
+ * Set new dimensions for the array; expand it again
*-------------------------------------------------------------------------
*/
@@ -348,7 +348,7 @@ int main( void )
if ( buf1[i][j] != data[i][j] ) TEST_ERROR;
/*-------------------------------------------------------------------------
- * Set new dimensions for the array; expand it again
+ * Set new dimensions for the array; expand it again
*-------------------------------------------------------------------------
*/
@@ -439,7 +439,7 @@ int main( void )
if ( buf1[i][j] != data[i][j] ) TEST_ERROR;
/*-------------------------------------------------------------------------
- * Set new dimensions for the array; expand it again
+ * Set new dimensions for the array; expand it again
*-------------------------------------------------------------------------
*/
diff --git a/test/sheap.c b/test/sheap.c
index f2b7e00..a7eda39 100644
--- a/test/sheap.c
+++ b/test/sheap.c
@@ -66,7 +66,7 @@ test_create(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -127,7 +127,7 @@ test_allocate_simple(hid_t fapl)
/* Create the file to work on */
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) TEST_ERROR;
-
+
/* Get a pointer to the internal file object */
if (NULL==(f=H5I_object(file))) {
H5Eprint_stack(H5E_DEFAULT, stdout);
@@ -213,9 +213,9 @@ error:
*
* Purpose: Test the segmented heap code
*
- * Return: Success:
+ * Return: Success:
*
- * Failure:
+ * Failure:
*
* Programmer: Quincey Koziol
* Wednesday, March 23, 2005
diff --git a/test/space_overflow.c b/test/space_overflow.c
index 2681275..fbb81d4 100644
--- a/test/space_overflow.c
+++ b/test/space_overflow.c
@@ -31,11 +31,11 @@
/*-------------------------------------------------------------------------
* Function: main
*
- * Purpose:
+ * Purpose:
*
- * Return: Success:
+ * Return: Success:
*
- * Failure:
+ * Failure:
*
* Programmer: Robb Matzke
* Monday, October 26, 1998
diff --git a/test/stab.c b/test/stab.c
index 68c7630..947825c 100644
--- a/test/stab.c
+++ b/test/stab.c
@@ -53,7 +53,7 @@ test_misc(hid_t file)
{
hid_t g1=-1, g2=-1, g3=-1;
char comment[64];
-
+
/* Test current working groups */
TESTING("miscellaneous group tests");
@@ -65,7 +65,7 @@ test_misc(hid_t file)
if (H5Gclose(g1)<0) goto error;
if (H5Gclose(g2)<0) goto error;
if (H5Gclose(g3)<0) goto error;
-
+
/* Open all groups with absolute names to check for exsistence */
if ((g1=H5Gopen(file, "/test_1a"))<0) goto error;
if ((g2=H5Gopen(file, "/test_1a/sub_1"))<0) goto error;
@@ -123,7 +123,7 @@ test_long(hid_t file)
hid_t g1=-1, g2=-1;
char *name1=NULL, *name2=NULL;
size_t namesize=40960, i;
-
+
TESTING("long names");
/* Group names */
@@ -145,7 +145,7 @@ test_long(hid_t file)
if ((g2=H5Gopen(file, name2))<0) goto error;
H5Gclose(g1);
H5Gclose(g2);
-
+
PASSED();
return 0;
@@ -248,7 +248,7 @@ main(void)
#if 0
H5Pset_sym_k(fcpl, 16, 16);
#endif
-
+
/* Open the file */
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl))<0)
diff --git a/test/tarray.c b/test/tarray.c
index 871ff9c..7c025f6 100644
--- a/test/tarray.c
+++ b/test/tarray.c
@@ -57,9 +57,9 @@
**
** test_array_atomic_1d(): Test basic array datatype code.
** Tests 1-D array of atomic datatypes
-**
+**
****************************************************************/
-static void
+static void
test_array_atomic_1d(void)
{
int wdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information to write */
@@ -114,7 +114,7 @@ test_array_atomic_1d(void)
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close file */
ret = H5Fclose(fid1);
CHECK(ret, FAIL, "H5Fclose");
@@ -179,9 +179,9 @@ test_array_atomic_1d(void)
**
** test_array_atomic_3d(): Test basic array datatype code.
** Tests 3-D array of atomic datatypes
-**
+**
****************************************************************/
-static void
+static void
test_array_atomic_3d(void)
{
int wdata[SPACE1_DIM1][ARRAY2_DIM1][ARRAY2_DIM2][ARRAY2_DIM3]; /* Information to write */
@@ -238,7 +238,7 @@ test_array_atomic_3d(void)
/* Close disk dataspace */
ret = H5Sclose(sid);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close file */
ret = H5Fclose(fid);
CHECK(ret, FAIL, "H5Fclose");
@@ -307,9 +307,9 @@ test_array_atomic_3d(void)
**
** test_array_array_atomic(): Test basic array datatype code.
** Tests 1-D array 2-D arrays of atomic datatypes
-**
+**
****************************************************************/
-static void
+static void
test_array_array_atomic(void)
{
int wdata[SPACE1_DIM1][ARRAY1_DIM1][ARRAY3_DIM1][ARRAY3_DIM2]; /* Information to write */
@@ -376,7 +376,7 @@ test_array_array_atomic(void)
/* Close disk dataspace */
ret = H5Sclose(sid);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close file */
ret = H5Fclose(fid);
CHECK(ret, FAIL, "H5Fclose");
@@ -466,9 +466,9 @@ test_array_array_atomic(void)
**
** test_array_compound_atomic(): Test basic array datatype code.
** Tests 1-D array of compound datatypes (with no array fields)
-**
+**
****************************************************************/
-static void
+static void
test_array_compound_atomic(void)
{
typedef struct { /* Typedef for compound datatype */
@@ -550,7 +550,7 @@ test_array_compound_atomic(void)
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close file */
ret = H5Fclose(fid1);
CHECK(ret, FAIL, "H5Fclose");
@@ -669,9 +669,9 @@ test_array_compound_atomic(void)
**
** test_array_compound_array(): Test basic array datatype code.
** Tests 1-D array of compound datatypes (with array fields)
-**
+**
****************************************************************/
-static void
+static void
test_array_compound_array(void)
{
typedef struct { /* Typedef for compound datatype */
@@ -764,7 +764,7 @@ test_array_compound_array(void)
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close file */
ret = H5Fclose(fid1);
CHECK(ret, FAIL, "H5Fclose");
@@ -919,7 +919,7 @@ void test_array_free_custom(void *mem, void *info);
** allocation routines. This routine just uses malloc to
** allocate the memory and increments the amount of memory
** allocated.
-**
+**
****************************************************************/
void *test_array_alloc_custom(size_t size, void *info)
{
@@ -947,7 +947,7 @@ void *test_array_alloc_custom(size_t size, void *info)
** allocation routines. This routine just uses free to
** release the memory and decrements the amount of memory
** allocated.
-**
+**
****************************************************************/
void test_array_free_custom(void *_mem, void *info)
{
@@ -972,9 +972,9 @@ void test_array_free_custom(void *_mem, void *info)
**
** test_array_vlen_atomic(): Test basic array datatype code.
** Tests 1-D array of atomic VL datatypes
-**
+**
****************************************************************/
-static void
+static void
test_array_vlen_atomic(void)
{
hvl_t wdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information to write */
@@ -1047,7 +1047,7 @@ test_array_vlen_atomic(void)
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close file */
ret = H5Fclose(fid1);
CHECK(ret, FAIL, "H5Fclose");
@@ -1163,7 +1163,7 @@ test_array_vlen_atomic(void)
/* Close dataset transfer property list */
ret = H5Pclose(xfer_pid);
CHECK(ret, FAIL, "H5Pclose");
-
+
/* Close Datatype */
ret = H5Tclose(tid1);
CHECK(ret, FAIL, "H5Tclose");
@@ -1182,9 +1182,9 @@ test_array_vlen_atomic(void)
**
** test_array_vlen_array(): Test basic array datatype code.
** Tests 1-D array of 1-D array VL datatypes
-**
+**
****************************************************************/
-static void
+static void
test_array_vlen_array(void)
{
hvl_t wdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information to write */
@@ -1267,7 +1267,7 @@ test_array_vlen_array(void)
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close file */
ret = H5Fclose(fid1);
CHECK(ret, FAIL, "H5Fclose");
@@ -1413,7 +1413,7 @@ test_array_vlen_array(void)
/* Close dataset transfer property list */
ret = H5Pclose(xfer_pid);
CHECK(ret, FAIL, "H5Pclose");
-
+
/* Close Datatype */
ret = H5Tclose(tid1);
CHECK(ret, FAIL, "H5Tclose");
@@ -1429,7 +1429,7 @@ test_array_vlen_array(void)
} /* end test_array_vlen_array() */
#define FIELDNAME "ArrayofStructures"
-#define LENGTH 5
+#define LENGTH 5
#define ALEN 10
#define RANK 1
#define NMAX 100
@@ -1448,50 +1448,50 @@ typedef struct
** test_array_bkg(): Test basic array datatype code.
** Tests reading compound datatype with array fields and
** writing partial fields.
-**
+**
****************************************************************/
-static void
+static void
test_array_bkg(void)
{
herr_t status = -1;
-
+
hid_t fid, array_dt;
hid_t space;
hid_t type;
hid_t dataset;
-
+
hsize_t dim[] = {LENGTH};
hsize_t dima[] = {ALEN};
- int i, j;
+ int i, j;
int ndims[3] = {1,1,1};
-
+
typedef struct
{
int a[ALEN];
float b[ALEN];
double c[ALEN];
} CmpField;
-
+
CmpField cf[LENGTH];
CmpField cfr[LENGTH];
CmpDTSinfo dtsinfo;
-
+
typedef struct
{
float b[ALEN];
} fld_t;
-
- fld_t fld[LENGTH];
- fld_t fldr[LENGTH];
-
+
+ fld_t fld[LENGTH];
+ fld_t fldr[LENGTH];
+
/* Output message about test being performed */
MESSAGE(5, ("Testing Partial I/O of Array Fields in Compound Datatype Functionality\n"));
- /* Initialize the data */
+ /* Initialize the data */
/* ------------------- */
for (i = 0; i < LENGTH; i++)
- {
+ {
for (j = 0; j < ALEN; j++)
{
cf[i].a[j] = 100*(i+1) + j;
@@ -1500,7 +1500,7 @@ test_array_bkg(void)
}
}
-
+
/* Set the number of data members */
/* ------------------------------ */
dtsinfo.nsubfields = 3;
@@ -1512,21 +1512,21 @@ test_array_bkg(void)
dtsinfo.offset[2] = HOFFSET(CmpField, c);
/* Initialize the data type IDs */
- /* ---------------------------- */
+ /* ---------------------------- */
dtsinfo.datatype[0] = H5T_NATIVE_INT;
dtsinfo.datatype[1] = H5T_NATIVE_FLOAT;
dtsinfo.datatype[2] = H5T_NATIVE_DOUBLE;
-
+
/* Initialize the names of data members */
- /* ------------------------------------ */
+ /* ------------------------------------ */
for (i = 0; i < dtsinfo.nsubfields; i++)
- dtsinfo.name[i] = (char *)calloc(20, sizeof(char));
-
+ dtsinfo.name[i] = (char *)calloc(20, sizeof(char));
+
strcpy(dtsinfo.name[0], "One");
strcpy(dtsinfo.name[1], "Two");
strcpy(dtsinfo.name[2], "Three");
-
+
/* Create file */
/* ----------- */
@@ -1543,11 +1543,11 @@ test_array_bkg(void)
type = H5Tcreate(H5T_COMPOUND, sizeof(CmpField));
CHECK(type, FAIL, "H5Tcreate");
-
+
/* Add members to the compound data type */
/* -------------------------------------- */
for ( i = 0; i < dtsinfo.nsubfields; i++)
- {
+ {
array_dt = H5Tarray_create (dtsinfo.datatype[i], ndims[i], dima, NULL);
CHECK(array_dt, FAIL, "H5Tarray_create");
@@ -1557,7 +1557,7 @@ test_array_bkg(void)
status = H5Tclose(array_dt);
CHECK(status, FAIL, "H5Tclose");
}
-
+
/* Create the dataset */
/* ------------------ */
dataset = H5Dcreate(fid, FIELDNAME, type, space, H5P_DEFAULT);
@@ -1567,13 +1567,13 @@ test_array_bkg(void)
/* ------------------------- */
status = H5Dwrite(dataset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, cf);
CHECK(status, FAIL, "H5Dwrite");
-
+
status = H5Dread(dataset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, cfr);
CHECK(status, FAIL, "H5Dread");
- /* Verify correct data */
+ /* Verify correct data */
/* ------------------- */
- for (i = 0; i < LENGTH; i++) {
+ for (i = 0; i < LENGTH; i++) {
for (j = 0; j < ALEN; j++) {
if(cf[i].a[j]!=cfr[i].a[j]) {
TestErrPrintf("Field a data doesn't match, cf[%d].a[%d]=%d, cfr[%d].a[%d]=%d\n",(int)i,(int)j,(int)cf[i].a[j],(int)i,(int)j,(int)cfr[i].a[j]);
@@ -1601,7 +1601,7 @@ test_array_bkg(void)
/* ----------- */
status = H5Tclose(type);
CHECK(status, FAIL, "H5Tclose");
-
+
status = H5Sclose(space);
CHECK(status, FAIL, "H5Sclose");
@@ -1610,7 +1610,7 @@ test_array_bkg(void)
status = H5Fclose(fid);
CHECK(status, FAIL, "H5Fclose");
-
+
/******************************/
/* Reopen the file and update */
@@ -1621,7 +1621,7 @@ test_array_bkg(void)
dataset = H5Dopen(fid, FIELDNAME );
CHECK(dataset, FAIL, "H5Dopen");
-
+
type = H5Tcreate(H5T_COMPOUND, sizeof(fld_t));
CHECK(type, FAIL, "H5Tcreate");
@@ -1631,7 +1631,7 @@ test_array_bkg(void)
status = H5Tinsert (type, "Two", HOFFSET(fld_t, b), array_dt);
CHECK(status, FAIL, "H5Tinsert");
- /* Initialize the data to overwrite */
+ /* Initialize the data to overwrite */
/* -------------------------------- */
for (i=0; i< LENGTH; i++)
for (j = 0; j < ALEN; j++)
@@ -1643,17 +1643,17 @@ test_array_bkg(void)
/* Read just the field changed */
status = H5Dread (dataset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, fldr);
CHECK(status, FAIL, "H5Dread");
-
- for (i=0; i< LENGTH; i++)
+
+ for (i=0; i< LENGTH; i++)
for (j = 0; j < ALEN; j++)
if(fld[i].b[j]!=fldr[i].b[j]) {
TestErrPrintf("Field data doesn't match, fld[%d].b[%d]=%f, fldr[%d].b[%d]=%f\n",(int)i,(int)j,(float)fld[i].b[j],(int)i,(int)j,(float)fldr[i].b[j]);
continue;
}
-
+
status = H5Tclose (type);
CHECK(status, FAIL, "H5Tclose");
-
+
status = H5Tclose (array_dt);
CHECK(status, FAIL, "H5Tclose");
@@ -1664,9 +1664,9 @@ test_array_bkg(void)
status = H5Dread(dataset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, cfr);
CHECK(status, FAIL, "H5Dread");
- /* Verify correct data */
+ /* Verify correct data */
/* ------------------- */
- for (i = 0; i < LENGTH; i++) {
+ for (i = 0; i < LENGTH; i++) {
for (j = 0; j < ALEN; j++) {
if(cf[i].a[j]!=cfr[i].a[j]) {
TestErrPrintf("Field a data doesn't match, cf[%d].a[%d]=%d, cfr[%d].a[%d]=%d\n",(int)i,(int)j,(int)cf[i].a[j],(int)i,(int)j,(int)cfr[i].a[j]);
@@ -1688,7 +1688,7 @@ test_array_bkg(void)
status = H5Tclose (type);
CHECK(status, FAIL, "H5Tclose");
-
+
status = H5Fclose(fid);
CHECK(status, FAIL, "H5Fclose");
@@ -1701,21 +1701,21 @@ test_array_bkg(void)
dataset = H5Dopen(fid, FIELDNAME );
CHECK(dataset, FAIL, "H5Dopen");
-
+
type = H5Dget_type(dataset);
CHECK(type, FAIL, "H5Dget_type");
- /* Reset the data to read in */
+ /* Reset the data to read in */
/* ------------------------- */
memset(cfr, 0, sizeof(CmpField)*LENGTH);
status = H5Dread(dataset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, cfr);
CHECK(status, FAIL, "H5Dread");
- /* Verify correct data */
+ /* Verify correct data */
/* ------------------- */
- for (i = 0; i < LENGTH; i++) {
+ for (i = 0; i < LENGTH; i++) {
for (j = 0; j < ALEN; j++) {
if(cf[i].a[j]!=cfr[i].a[j]) {
TestErrPrintf("Field a data doesn't match, cf[%d].a[%d]=%d, cfr[%d].a[%d]=%d\n",(int)i,(int)j,(int)cf[i].a[j],(int)i,(int)j,(int)cfr[i].a[j]);
@@ -1737,7 +1737,7 @@ test_array_bkg(void)
status = H5Tclose (type);
CHECK(status, FAIL, "H5Tclose");
-
+
status = H5Fclose(fid);
CHECK(status, FAIL, "H5Fclose");
} /* end test_array_bkg() */
@@ -1748,9 +1748,9 @@ test_array_bkg(void)
** Reads file containing old version of datatype object header
** messages for compound datatypes and verifies reading the older
** version of the is working correctly.
-**
+**
****************************************************************/
-static void
+static void
test_compat(void)
{
typedef struct { /* Typedef for compound datatype */
@@ -1785,7 +1785,7 @@ test_compat(void)
MESSAGE(5, ("Testing Array Datatypes Compatibility Functionality\n"));
/*
- * Try reading a file that has been prepared that has datasets with
+ * Try reading a file that has been prepared that has datasets with
* compound datatypes which use an older version (version 1) of the
* datatype object header message for describing the datatype.
*
@@ -2052,9 +2052,9 @@ test_compat(void)
/****************************************************************
**
** test_array(): Main array datatype testing routine.
-**
+**
****************************************************************/
-void
+void
test_array(void)
{
/* Output message about test being performed */
diff --git a/test/tattr.c b/test/tattr.c
index 6727442..4297316 100644
--- a/test/tattr.c
+++ b/test/tattr.c
@@ -54,7 +54,7 @@ int attr_data1[ATTR1_DIM1]={512,-234,98123}; /* Test data for 1st attribute */
/* rank & dimensions for another attribute */
#define ATTR1A_NAME "Attr1_a"
-int attr_data1a[ATTR1_DIM1]={256,11945,-22107};
+int attr_data1a[ATTR1_DIM1]={256,11945,-22107};
#define ATTR2_NAME "Attr2"
#define ATTR2_RANK 2
@@ -96,9 +96,9 @@ herr_t attr_op1(hid_t loc_id, const char *name, void *op_data);
**
** test_attr_basic_write(): Test basic H5A (attribute) code.
** Tests integer attributes on both datasets and groups
-**
+**
****************************************************************/
-static void
+static void
test_attr_basic_write(void)
{
hid_t fid1; /* HDF5 File IDs */
@@ -154,11 +154,11 @@ test_attr_basic_write(void)
/* Create an another attribute for the dataset */
attr2=H5Acreate(dataset,ATTR1A_NAME,H5T_NATIVE_INT,sid2,H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate");
-
+
/* Write attribute information */
ret=H5Awrite(attr2,H5T_NATIVE_INT,attr_data1a);
CHECK(ret, FAIL, "H5Awrite");
-
+
/* Check storage size for attribute */
attr_size=H5Aget_storage_size(attr);
VERIFY(attr_size, (ATTR1_DIM1*sizeof(int)), "H5A_get_storage_size");
@@ -191,10 +191,10 @@ test_attr_basic_write(void)
/* Verify new attribute name */
attr_name_size = H5Aget_name(attr, 0, NULL);
CHECK(attr_name_size, FAIL, "H5Aget_name");
-
+
if(attr_name_size>0)
attr_name = (char*)HDcalloc((size_t)(attr_name_size+1), sizeof(char));
-
+
ret=(herr_t)H5Aget_name(attr, (size_t)(attr_name_size+1), attr_name);
CHECK(ret, FAIL, "H5Aget_name");
ret=HDstrcmp(attr_name, ATTR_TMP_NAME);
@@ -218,16 +218,16 @@ test_attr_basic_write(void)
/* Open the second attribute again */
- attr2=H5Aopen_name(dataset, ATTR1A_NAME);
+ attr2=H5Aopen_name(dataset, ATTR1A_NAME);
CHECK(attr, FAIL, "H5Aopen_name");
/* Verify new attribute name */
attr_name_size = H5Aget_name(attr2, 0, NULL);
CHECK(attr_name_size, FAIL, "H5Aget_name");
-
+
if(attr_name_size>0)
attr_name = (char*)HDcalloc((size_t)(attr_name_size+1), sizeof(char));
-
+
ret=(herr_t)H5Aget_name(attr2, (size_t)(attr_name_size+1), attr_name);
CHECK(ret, FAIL, "H5Aget_name");
ret=HDstrcmp(attr_name, ATTR1A_NAME);
@@ -248,7 +248,7 @@ test_attr_basic_write(void)
/* Close attribute */
ret=H5Aclose(attr2);
CHECK(ret, FAIL, "H5Aclose");
-
+
/* change first attribute back to the original name */
ret=H5Arename(dataset, ATTR_TMP_NAME, ATTR1_NAME);
CHECK(ret, FAIL, "H5Arename");
@@ -277,7 +277,7 @@ test_attr_basic_write(void)
/* Check storage size for attribute */
attr_size=H5Aget_storage_size(attr);
VERIFY(attr_size, (ATTR2_DIM1*ATTR2_DIM2*sizeof(int)), "H5Aget_storage_size");
-
+
/* Try to create the same attribute again (should fail) */
ret=H5Acreate(group,ATTR2_NAME,H5T_NATIVE_INT,sid2,H5P_DEFAULT);
VERIFY(ret, FAIL, "H5Acreate");
@@ -289,7 +289,7 @@ test_attr_basic_write(void)
/* Check storage size for attribute */
attr_size=H5Aget_storage_size(attr);
VERIFY(attr_size, (ATTR2_DIM1*ATTR2_DIM2*sizeof(int)), "H5A_get_storage_size");
-
+
/* Close attribute */
ret=H5Aclose(attr);
CHECK(ret, FAIL, "H5Aclose");
@@ -310,9 +310,9 @@ test_attr_basic_write(void)
/****************************************************************
**
** test_attr_basic_read(): Test basic H5A (attribute) code.
-**
+**
****************************************************************/
-static void
+static void
test_attr_basic_read(void)
{
hid_t fid1; /* HDF5 File IDs */
@@ -397,9 +397,9 @@ test_attr_basic_read(void)
**
** test_attr_flush(): Test H5A (attribute) code for performing
** I/O when H5Fflush is used.
-**
+**
****************************************************************/
-static void
+static void
test_attr_flush(void)
{
hid_t fil, /* File ID */
@@ -463,9 +463,9 @@ test_attr_flush(void)
**
** test_attr_compound_write(): Test H5A (attribute) code.
** Tests compound datatype attributes
-**
+**
****************************************************************/
-static void
+static void
test_attr_compound_write(void)
{
hid_t fid1; /* HDF5 File IDs */
@@ -550,9 +550,9 @@ test_attr_compound_write(void)
/****************************************************************
**
** test_attr_compound_read(): Test basic H5A (attribute) code.
-**
+**
****************************************************************/
-static void
+static void
test_attr_compound_read(void)
{
hid_t fid1; /* HDF5 File IDs */
@@ -565,7 +565,7 @@ test_attr_compound_read(void)
hsize_t dims[ATTR_MAX_DIMS]; /* Attribute dimensions */
H5T_class_t t_class; /* Attribute datatype class */
H5T_order_t order; /* Attribute datatype order */
- size_t size; /* Attribute datatype size as stored in file */
+ size_t size; /* Attribute datatype size as stored in file */
int fields; /* # of Attribute datatype fields */
char *fieldname; /* Name of a field */
size_t offset; /* Attribute datatype field offset */
@@ -616,7 +616,7 @@ test_attr_compound_read(void)
VERIFY(fields, 3, "H5Tget_nmembers");
for(i=0; i<fields; i++) {
fieldname=H5Tget_member_name(type,(unsigned)i);
- if(!(HDstrcmp(fieldname,ATTR4_FIELDNAME1) ||
+ if(!(HDstrcmp(fieldname,ATTR4_FIELDNAME1) ||
HDstrcmp(fieldname,ATTR4_FIELDNAME2) ||
HDstrcmp(fieldname,ATTR4_FIELDNAME3)))
TestErrPrintf("invalid field name for field #%d: %s\n",i,fieldname);
@@ -697,9 +697,9 @@ test_attr_compound_read(void)
/****************************************************************
**
** test_attr_scalar_write(): Test scalar H5A (attribute) writing code.
-**
+**
****************************************************************/
-static void
+static void
test_attr_scalar_write(void)
{
hid_t fid1; /* HDF5 File IDs */
@@ -761,9 +761,9 @@ test_attr_scalar_write(void)
/****************************************************************
**
** test_attr_scalar_read(): Test scalar H5A (attribute) reading code.
-**
+**
****************************************************************/
-static void
+static void
test_attr_scalar_read(void)
{
hid_t fid1; /* HDF5 File IDs */
@@ -826,9 +826,9 @@ test_attr_scalar_read(void)
**
** test_attr_mult_write(): Test basic H5A (attribute) code.
** Tests integer attributes on both datasets and groups
-**
+**
****************************************************************/
-static void
+static void
test_attr_mult_write(void)
{
hid_t fid1; /* HDF5 File IDs */
@@ -944,9 +944,9 @@ test_attr_mult_write(void)
/****************************************************************
**
** test_attr_mult_read(): Test basic H5A (attribute) code.
-**
+**
****************************************************************/
-static void
+static void
test_attr_mult_read(void)
{
hid_t fid1; /* HDF5 File IDs */
@@ -960,7 +960,7 @@ test_attr_mult_read(void)
hsize_t dims[ATTR_MAX_DIMS]; /* Attribute dimensions */
H5T_class_t t_class; /* Attribute datatype class */
H5T_order_t order; /* Attribute datatype order */
- size_t size; /* Attribute datatype size as stored in file */
+ size_t size; /* Attribute datatype size as stored in file */
int read_data1[ATTR1_DIM1]={0}; /* Buffer for reading 1st attribute */
int read_data2[ATTR2_DIM1][ATTR2_DIM2]={{0}}; /* Buffer for reading 2nd attribute */
double read_data3[ATTR3_DIM1][ATTR3_DIM2][ATTR3_DIM3]={{{0}}}; /* Buffer for reading 3rd attribute */
@@ -1163,7 +1163,7 @@ test_attr_mult_read(void)
/****************************************************************
**
** attr_op1(): Attribute operator
-**
+**
****************************************************************/
herr_t attr_op1(hid_t UNUSED loc_id, const char *name, void *op_data)
{
@@ -1188,7 +1188,7 @@ herr_t attr_op1(hid_t UNUSED loc_id, const char *name, void *op_data)
TestErrPrintf("attribute name different: name=%s, should be %s\n",name,ATTR3_NAME);
(*count)++;
break;
-
+
default:
ret=-1;
break;
@@ -1200,9 +1200,9 @@ herr_t attr_op1(hid_t UNUSED loc_id, const char *name, void *op_data)
/****************************************************************
**
** test_attr_iterate(): Test H5A (attribute) iterator code.
-**
+**
****************************************************************/
-static void
+static void
test_attr_iterate(void)
{
hid_t file; /* HDF5 File ID */
@@ -1271,9 +1271,9 @@ test_attr_iterate(void)
/****************************************************************
**
** test_attr_delete(): Test H5A (attribute) code for deleting objects.
-**
+**
****************************************************************/
-static void
+static void
test_attr_delete(void)
{
hid_t fid1; /* HDF5 File ID */
@@ -1385,9 +1385,9 @@ test_attr_delete(void)
**
** test_attr_dtype_shared(): Test H5A (attribute) code for using
** shared datatypes in attributes.
-**
+**
****************************************************************/
-static void
+static void
test_attr_dtype_shared(void)
{
hid_t file_id; /* File ID */
@@ -1558,9 +1558,9 @@ test_attr_dtype_shared(void)
/****************************************************************
**
** test_attr(): Main H5A (attribute) testing routine.
-**
+**
****************************************************************/
-void
+void
test_attr(void)
{
/* Output message about test being performed */
diff --git a/test/tconfig.c b/test/tconfig.c
index cce4fb3..c53e2ad 100644
--- a/test/tconfig.c
+++ b/test/tconfig.c
@@ -62,7 +62,7 @@ void test_config_ctypes(void);
*
*-------------------------------------------------------------------------
*/
-void
+void
test_configure(void)
{
/* Output message about test being performed */
@@ -108,7 +108,7 @@ cleanup_configure(void)
*
*-------------------------------------------------------------------------
*/
-void
+void
test_config_ctypes(void)
{
/* standard C89 basic types */
diff --git a/test/testframe.c b/test/testframe.c
index b6a56a8..45992a0 100644
--- a/test/testframe.c
+++ b/test/testframe.c
@@ -17,7 +17,7 @@
* Tuesday, January 6, 2004
*
* Purpose: Provides support functions for the testing framework.
- *
+ *
*/
#include "testhdf5.h"
@@ -66,7 +66,7 @@ static int (*TestPrivateParser)(int ac, char *av[]) = NULL;
* Parameters--pointer to extra parameters. Use NULL if none used.
* Since only the pointer is copied, the contents should not change.
*/
-void
+void
AddTest(const char *TheName, void (*TheCall) (void), void (*Cleanup) (void), const char *TheDescr, const void *Parameters)
{
/* Sanity checking */
@@ -438,7 +438,7 @@ const void *GetTestParameters(void)
* This routine is designed to provide equivalent functionality to 'printf'
* and also increment the error count for the testing framework.
*/
-int
+int
TestErrPrintf(const char *format, ...)
{
va_list arglist;
@@ -457,7 +457,7 @@ TestErrPrintf(const char *format, ...)
}
-/*
+/*
* Set (control) which test will be tested.
* SKIPTEST: skip this test
* ONLYTEST: do only this test
diff --git a/test/testhdf5.c b/test/testhdf5.c
index 7022163..925b8f8 100644
--- a/test/testhdf5.c
+++ b/test/testhdf5.c
@@ -36,7 +36,7 @@
/* ANY new test needs to have a prototype in testhdf5.h */
#include "testhdf5.h"
-int
+int
main(int argc, char *argv[])
{
/* Initialize testing framework */
diff --git a/test/testmeta.c b/test/testmeta.c
index 03fd841..17bdd34 100644
--- a/test/testmeta.c
+++ b/test/testmeta.c
@@ -21,7 +21,7 @@
*
* When writing in single file mode, the assertion errors still occur
* but the H5Gcreate error does not.
- */
+ */
#include "hdf5.h"
@@ -57,7 +57,7 @@ int main(void)
/* Create a file */
file_id = H5Fcreate(FILEN, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
-
+
/* Create a dataset to hold the number of data objects */
/* Create the data space */
dataspace_id = H5Screate(H5S_SCALAR);
@@ -65,11 +65,11 @@ int main(void)
/* Create dataset */
dataset_id = H5Dcreate(file_id, "/NumDataObj",
H5T_NATIVE_UINT, dataspace_id, H5P_DEFAULT);
-
+
/* Write value to NumDataObj dataset */
status = H5Dwrite(dataset_id, H5T_NATIVE_UINT, H5S_ALL,
H5S_ALL, H5P_DEFAULT, &numdataobj);
-
+
/* Close the identifiers */
status = H5Dclose(dataset_id);
status = H5Sclose(dataspace_id);
@@ -79,27 +79,27 @@ int main(void)
prop_id = H5Pcreate(H5P_DATASET_CREATE);
dims[0] = CHUNK_SIZE;
status = H5Pset_chunk(prop_id, 1, dims);
-
+
/* Create dataspace */
dims[0]=1;
maxdims[0]=H5S_UNLIMITED;
dataspace_id = H5Screate_simple(1, dims, maxdims);
-
+
for(i=0; i<NEXTARRAYS; i++)
{
/* Create dataset */
sprintf(name, "/ExtArray%06d", i);
dataset_id = H5Dcreate(file_id, name,
H5T_NATIVE_FLOAT, dataspace_id, prop_id);
-
+
/* Close the identifier */
status = H5Dclose(dataset_id);
}
-
+
/* Close the identifiers */
status = H5Sclose(dataspace_id);
status = H5Pclose(prop_id);
-
+
/* Create group to hold data object data arrays */
group_id = H5Gcreate(file_id, "/DataArray", 0);
H5Gclose(group_id);
@@ -108,7 +108,7 @@ int main(void)
{
printf("\rWriting Object #%d of %d", j+1, NDATAOBJECTS);
fflush(stdout);
-
+
floatval = (float)j;
/* Create group to hold data arrays for this object */
@@ -116,11 +116,11 @@ int main(void)
group_id = H5Gcreate(file_id, name, 0);
if(group_id < 0)
{
- fprintf(stderr, "Failed to create DataArray group.\n");
+ fprintf(stderr, "Failed to create DataArray group.\n");
status = H5Fclose(file_id);
return -1;
}
-
+
/* Loop over data arrays */
for(i=0; i<NDATAARRAYS; i++)
{
@@ -128,57 +128,57 @@ int main(void)
dims[0]=NPOINTS;
maxdims[0]=NPOINTS;
dataspace_id = H5Screate_simple(1 ,dims, maxdims);
-
+
/* Create dataset */
sprintf(name, "DataArray%06d", i);
dataset_id = H5Dcreate(group_id, name,
H5T_NATIVE_FLOAT, dataspace_id, H5P_DEFAULT);
if(dataset_id < 0)
{
- fprintf(stderr, "Failed to create DataArray dataset.\n");
+ fprintf(stderr, "Failed to create DataArray dataset.\n");
status = H5Fclose(file_id);
return -1;
}
-
+
/* Write the data array data */
status = H5Dwrite(dataset_id, H5T_NATIVE_FLOAT, H5S_ALL,
H5S_ALL, H5P_DEFAULT, data);
if(status < 0)
{
- fprintf(stderr, "Failed to write DataArray dataset.\n");
+ fprintf(stderr, "Failed to write DataArray dataset.\n");
status = H5Fclose(file_id);
return -1;
}
-
+
/* Close the identifiers */
status = H5Dclose(dataset_id);
status = H5Sclose(dataspace_id);
}
-
+
/* Open NumDataObj dataset */
dataset_id = H5Dopen(file_id, "/NumDataObj");
if(dataset_id < 0)
{
- fprintf(stderr, "Failed to open NumDataObj dataset.\n");
+ fprintf(stderr, "Failed to open NumDataObj dataset.\n");
status = H5Fclose(file_id);
return -1;
}
-
+
/* Write value to NumDataObj dataset */
numdataobj = j + 1;
status = H5Dwrite(dataset_id, H5T_NATIVE_UINT, H5S_ALL,
H5S_ALL, H5P_DEFAULT, &numdataobj);
if(status < 0)
{
- fprintf(stderr, "Failed to write NumDataObj dataset.\n");
+ fprintf(stderr, "Failed to write NumDataObj dataset.\n");
status = H5Fclose(file_id);
return -1;
}
-
+
/* Close identifiers */
status = H5Dclose(dataset_id);
status = H5Gclose(group_id);
-
+
/* Extend attribute arrays */
for(i=0; i<NEXTARRAYS; i++)
{
@@ -187,21 +187,21 @@ int main(void)
dataset_id = H5Dopen(file_id, name);
if(dataset_id < 0)
{
- fprintf(stderr, "Failed to open ExtArray dataset.\n");
+ fprintf(stderr, "Failed to open ExtArray dataset.\n");
status = H5Fclose(file_id);
return -1;
}
-
+
/* Extend attribute dataset */
dims[0] = (hsize_t)j + 1;
status = H5Dextend(dataset_id, dims);
if(status < 0)
{
- fprintf(stderr, "Failed to extend DataArray dataset.\n");
+ fprintf(stderr, "Failed to extend DataArray dataset.\n");
status = H5Fclose(file_id);
return -1;
}
-
+
/* Select element and write value to attribute dataset */
dims[0] = 1;
memspace_id = H5Screate_simple(1, dims, dims);
@@ -218,7 +218,7 @@ int main(void)
dataspace_id, H5P_DEFAULT, &floatval);
if(status < 0)
{
- fprintf(stderr, "Failed to write DataArray dataset.\n");
+ fprintf(stderr, "Failed to write DataArray dataset.\n");
status = H5Fclose(file_id);
return -1;
}
@@ -231,10 +231,10 @@ int main(void)
}
}
-
+
/* Close the file */
status = H5Fclose(file_id);
-
+
printf("\n");
return 0;
diff --git a/test/tfile.c b/test/tfile.c
index ece7cdb..ea8a7c4 100644
--- a/test/tfile.c
+++ b/test/tfile.c
@@ -41,7 +41,7 @@
#define F2_RANK 2
#define F2_DIM0 4
#define F2_DIM1 6
-#define F2_DSET "dset"
+#define F2_DSET "dset"
#define FILE2 "tfile2.h5"
#define F3_USERBLOCK_SIZE (hsize_t)0
@@ -58,12 +58,12 @@
#define FILE4 "tfile4.h5"
#define OBJ_ID_COUNT_0 0
-#define OBJ_ID_COUNT_1 1
+#define OBJ_ID_COUNT_1 1
#define OBJ_ID_COUNT_2 2
-#define OBJ_ID_COUNT_3 3
-#define OBJ_ID_COUNT_4 4
-#define OBJ_ID_COUNT_6 6
-#define OBJ_ID_COUNT_8 8
+#define OBJ_ID_COUNT_3 3
+#define OBJ_ID_COUNT_4 4
+#define OBJ_ID_COUNT_6 6
+#define OBJ_ID_COUNT_8 8
#define GROUP1 "Group1"
#define DSET1 "Dataset1"
@@ -82,15 +82,15 @@ static void
create_objects(hid_t, hid_t, hid_t *, hid_t *, hid_t *, hid_t *);
static void
test_obj_count_and_id(hid_t, hid_t, hid_t, hid_t, hid_t, hid_t);
-static void
+static void
check_file_id(hid_t, hid_t);
/****************************************************************
**
** test_file_create(): Low-level file creation I/O test routine.
-**
+**
****************************************************************/
-static void
+static void
test_file_create(void)
{
hid_t fid1, fid2, fid3; /* HDF5 File IDs */
@@ -214,8 +214,8 @@ test_file_create(void)
unsigned i,j;
/* Create the data space for the dataset. */
- dims[0] = F2_DIM0;
- dims[1] = F2_DIM1;
+ dims[0] = F2_DIM0;
+ dims[1] = F2_DIM1;
dataspace_id = H5Screate_simple(F2_RANK, dims, NULL);
CHECK(dataspace_id, FAIL, "H5Screate_simple");
@@ -235,7 +235,7 @@ test_file_create(void)
ret = H5Dclose(dataset_id);
CHECK(ret, FAIL, "H5Dclose");
- /* Terminate access to the data space. */
+ /* Terminate access to the data space. */
ret = H5Sclose(dataspace_id);
CHECK(ret, FAIL, "H5Sclose");
}
@@ -321,9 +321,9 @@ test_file_create(void)
/****************************************************************
**
** test_file_open(): Low-level file open I/O test routine.
-**
+**
****************************************************************/
-static void
+static void
test_file_open(void)
{
hid_t fid1, fid2; /*HDF5 File IDs */
@@ -338,9 +338,9 @@ test_file_open(void)
herr_t ret; /*generic return value */
/*
- * Test single file open
+ * Test single file open
*/
-
+
/* Output message about test being performed */
MESSAGE(5, ("Testing Low-Level File Opening I/O\n"));
@@ -377,8 +377,8 @@ test_file_open(void)
/*
- * Test two file opens: one is opened H5F_ACC_RDONLY and H5F_CLOSE_WEAK.
- * It's closed with an object left open. Then another is opened
+ * Test two file opens: one is opened H5F_ACC_RDONLY and H5F_CLOSE_WEAK.
+ * It's closed with an object left open. Then another is opened
* H5F_ACC_RDWR, which should fail.
*/
@@ -388,7 +388,7 @@ test_file_open(void)
/* Create file access property list */
fapl_id = H5Pcreate(H5P_FILE_ACCESS);
CHECK(fapl_id, FAIL, "H5Pcreate");
-
+
/* Set file close mode to H5F_CLOSE_WEAK */
ret = H5Pset_fclose_degree(fapl_id, H5F_CLOSE_WEAK);
CHECK(ret, FAIL, "H5Pset_fclose_degree");
@@ -396,7 +396,7 @@ test_file_open(void)
/* Open file for first time */
fid1 = H5Fopen(FILE2, H5F_ACC_RDONLY, fapl_id);
CHECK(fid1, FAIL, "H5Fopen");
-
+
/* Open dataset */
did = H5Dopen(fid1, F2_DSET);
CHECK(did, FAIL, "H5Dopen");
@@ -416,11 +416,11 @@ test_file_open(void)
/****************************************************************
**
-** test_file_close(): low-level file close test routine.
+** test_file_close(): low-level file close test routine.
** It mainly tests behavior with close degree.
**
*****************************************************************/
-static void
+static void
test_file_close(void)
{
hid_t fid1, fid2;
@@ -434,7 +434,7 @@ test_file_close(void)
*/
fid1 = H5Fcreate(FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
CHECK(fid1, FAIL, "H5Fcreate");
-
+
fapl_id = H5Pcreate(H5P_FILE_ACCESS);
CHECK(fapl_id, FAIL, "H5Pcreate");
@@ -450,8 +450,8 @@ test_file_close(void)
ret = H5Pset_fclose_degree(fapl_id, H5F_CLOSE_DEFAULT);
CHECK(ret, FAIL, "H5Pset_fclose_degree");
-
- /* should succeed */
+
+ /* should succeed */
fid2 = H5Fopen(FILE1, H5F_ACC_RDWR, fapl_id);
CHECK(fid2, FAIL, "H5Fopen");
@@ -464,7 +464,7 @@ test_file_close(void)
CHECK(ret, FAIL, "H5Fclose");
- /* Test behavior while opening file multiple times with different file
+ /* Test behavior while opening file multiple times with different file
* close degree
*/
fid1 = H5Fcreate(FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -489,7 +489,7 @@ test_file_close(void)
CHECK(ret, FAIL, "H5Fclose");
- /* Test behavior while opening file multiple times with file close
+ /* Test behavior while opening file multiple times with file close
* degree STRONG */
ret = H5Pset_fclose_degree(fapl_id, H5F_CLOSE_STRONG);
CHECK(ret, FAIL, "H5Pset_fclose_degree");
@@ -548,19 +548,19 @@ test_file_close(void)
/* Create a dataset and a group in each file open respectively */
create_objects(fid1, fid2, &dataset_id, &group_id1, &group_id2, &group_id3);
- /* Close first open, should fail since it is SEMI and objects are
+ /* Close first open, should fail since it is SEMI and objects are
* still open. */
ret = H5Fclose(fid1);
VERIFY(ret, FAIL, "H5Fclose");
- /* Close second open, should fail since it is SEMI and objects are
+ /* Close second open, should fail since it is SEMI and objects are
* still open. */
ret = H5Fclose(fid2);
VERIFY(ret, FAIL, "H5Fclose");
ret = H5Dclose(dataset_id);
CHECK(ret, FAIL, "H5Dclose");
-
+
/* Close first open */
ret = H5Fclose(fid1);
CHECK(ret, FAIL, "H5Fclose");
@@ -571,7 +571,7 @@ test_file_close(void)
ret = H5Gclose(group_id2);
CHECK(ret, FAIL, "H5Gclose");
- /* Close second open, should fail since it is SEMI and one group ID is
+ /* Close second open, should fail since it is SEMI and one group ID is
* still open. */
ret = H5Fclose(fid2);
VERIFY(ret, FAIL, "H5Fclose");
@@ -614,14 +614,14 @@ test_file_close(void)
create_objects(fid1, fid2, &dataset_id, &group_id1, &group_id2, &group_id3);
/* Create more new files and test object count and ID list functions */
- test_obj_count_and_id(fid1, fid2, dataset_id, group_id1,
+ test_obj_count_and_id(fid1, fid2, dataset_id, group_id1,
group_id2, group_id3);
-
+
/* Close first open */
ret = H5Fclose(fid1);
CHECK(ret, FAIL, "H5Fclose");
- /* Close second open. File will be finally closed after all objects
+ /* Close second open. File will be finally closed after all objects
* are closed. */
ret = H5Fclose(fid2);
CHECK(ret, FAIL, "H5Fclose");
@@ -663,7 +663,7 @@ test_file_close(void)
/* Create a dataset and a group in each file open respectively */
create_objects(fid1, fid2, &dataset_id, &group_id1, &group_id2, &group_id3);
-
+
access_id = H5Fget_access_plist(fid1);
CHECK(access_id, FAIL, "H5Fget_access_plist");
@@ -730,7 +730,7 @@ test_file_close(void)
**
****************************************************************/
static void
-create_objects(hid_t fid1, hid_t fid2, hid_t *ret_did, hid_t *ret_gid1,
+create_objects(hid_t fid1, hid_t fid2, hid_t *ret_did, hid_t *ret_gid1,
hid_t *ret_gid2, hid_t *ret_gid3)
{
int oid_count;
@@ -837,10 +837,10 @@ create_objects(hid_t fid1, hid_t fid2, hid_t *ret_did, hid_t *ret_gid1,
/****************************************************************
**
-** test_get_file_id(): Test H5Iget_file_id()
+** test_get_file_id(): Test H5Iget_file_id()
**
*****************************************************************/
-static void
+static void
test_get_file_id(void)
{
hid_t fid, fid2, fid3;
@@ -861,7 +861,7 @@ test_get_file_id(void)
*/
group_id = H5Gcreate(fid, GRP_NAME, (size_t)0);
CHECK(group_id, FAIL, "H5Gcreate");
-
+
/* Test H5Iget_file_id() */
check_file_id(fid, group_id);
@@ -874,29 +874,29 @@ test_get_file_id(void)
ret = H5Gclose(group_id);
CHECK(ret, FAIL, "H5Gclose");
-
+
/* Open the file again. Test H5Iget_file_id() */
- fid = H5Fopen(FILE4, H5F_ACC_RDWR, H5P_DEFAULT);
+ fid = H5Fopen(FILE4, H5F_ACC_RDWR, H5P_DEFAULT);
CHECK(fid, FAIL, "H5Fcreate");
-
+
group_id = H5Gopen(fid, GRP_NAME);
CHECK(group_id, FAIL, "H5Gcreate");
-
+
/* Test H5Iget_file_id() */
check_file_id(fid, group_id);
/* Open the file for second time. Test H5Iget_file_id() */
fid3 = H5Freopen(fid);
CHECK(fid3, FAIL, "H5Freopen");
-
+
/* Test H5Iget_file_id() */
check_file_id(fid3, fid3);
-
+
ret = H5Fclose(fid3);
CHECK(ret, FAIL, "H5Fclose");
-
- /* Create a dataset in the group. Make a duplicated file ID from the
- * dataset. And close this duplicated ID.
+
+ /* Create a dataset in the group. Make a duplicated file ID from the
+ * dataset. And close this duplicated ID.
*/
dims[0] = F2_DIM0;
dims[1] = F2_DIM1;
@@ -906,10 +906,10 @@ test_get_file_id(void)
dataset_id = H5Dcreate(group_id, DSET_NAME, H5T_NATIVE_INT, dataspace_id,
H5P_DEFAULT);
CHECK(dataset_id, FAIL, "H5Dcreate");
-
+
/* Test H5Iget_file_id() */
check_file_id(fid, dataset_id);
-
+
/* Create an attribute for the dataset. Make a duplicated file ID from
* this attribute. And close it.
*/
@@ -924,10 +924,10 @@ test_get_file_id(void)
*/
datatype_id=H5Tcopy(H5T_NATIVE_INT);
CHECK(ret, FAIL, "H5Acreate");
-
+
ret = H5Tcommit(fid, TYPE_NAME, datatype_id);
CHECK(ret, FAIL, "H5Tcommit");
-
+
/* Test H5Iget_file_id() */
check_file_id(fid, datatype_id);
@@ -936,38 +936,38 @@ test_get_file_id(void)
*/
plist = H5Pcreate(H5P_FILE_ACCESS);
CHECK(plist, FAIL, "H5Pcreate");
-
+
H5E_BEGIN_TRY {
fid2 = H5Iget_file_id(plist);
} H5E_END_TRY;
VERIFY(fid2, FAIL, "H5Iget_file_id");
-
- /* Close objects */
+
+ /* Close objects */
ret = H5Tclose(datatype_id);
CHECK(ret, FAIL, "H5Tclose");
ret = H5Aclose(attr_id);
CHECK(ret, FAIL, "H5Aclose");
-
+
ret = H5Sclose(dataspace_id);
CHECK(ret, FAIL, "H5Sclose");
ret = H5Dclose(dataset_id);
CHECK(ret, FAIL, "H5Dclose");
-
+
ret = H5Gclose(group_id);
CHECK(ret, FAIL, "H5Gclose");
-
+
ret = H5Fclose(fid);
CHECK(ret, FAIL, "H5Fclose");
}
/****************************************************************
**
-** check_file_id(): Internal function of test_get_file_id()
+** check_file_id(): Internal function of test_get_file_id()
**
*****************************************************************/
-static void
+static void
check_file_id(hid_t fid, hid_t object_id)
{
hid_t new_fid;
@@ -989,11 +989,11 @@ check_file_id(hid_t fid, hid_t object_id)
/****************************************************************
**
-** test_obj_count_and_id(): test object count and ID list functions.
+** test_obj_count_and_id(): test object count and ID list functions.
**
****************************************************************/
-static void
-test_obj_count_and_id(hid_t fid1, hid_t fid2, hid_t did, hid_t gid1,
+static void
+test_obj_count_and_id(hid_t fid1, hid_t fid2, hid_t did, hid_t gid1,
hid_t gid2, hid_t gid3)
{
hid_t fid3, fid4;
@@ -1062,7 +1062,7 @@ test_obj_count_and_id(hid_t fid1, hid_t fid2, hid_t did, hid_t gid1,
oid_list[i]!=gid3) {
ret = FAIL;
CHECK(ret, FAIL, "H5Fget_obj_ids");
- }
+ }
break;
case H5I_DATASET:
VERIFY(oid_list[i], did, "H5Fget_obj_ids");
@@ -1071,7 +1071,7 @@ test_obj_count_and_id(hid_t fid1, hid_t fid2, hid_t did, hid_t gid1,
ret = FAIL;
CHECK(ret, FAIL, "H5Fget_obj_ids");
}
- }
+ }
free(oid_list);
}
@@ -1085,13 +1085,13 @@ test_obj_count_and_id(hid_t fid1, hid_t fid2, hid_t did, hid_t gid1,
/****************************************************************
**
-** test_file_perm(): low-level file test routine.
-** This test verifies that a file can be opened for both
+** test_file_perm(): low-level file test routine.
+** This test verifies that a file can be opened for both
** read-only and read-write access and things will be handled
** appropriately.
**
*****************************************************************/
-static void
+static void
test_file_perm(void)
{
hid_t file; /* File opened with read-write permission */
@@ -1099,7 +1099,7 @@ test_file_perm(void)
hid_t dspace; /* Dataspace ID */
hid_t dset; /* Dataset ID */
herr_t ret;
-
+
/* Output message about test being performed */
MESSAGE(5, ("Testing Low-Level File Permissions\n"));
@@ -1144,12 +1144,12 @@ test_file_perm(void)
/****************************************************************
**
-** test_file_freespace(): low-level file test routine.
+** test_file_freespace(): low-level file test routine.
** This test checks the free space available in a file in various
** situations.
**
*****************************************************************/
-static void
+static void
test_file_freespace(void)
{
hid_t file; /* File opened with read-write permission */
@@ -1160,7 +1160,7 @@ test_file_freespace(void)
unsigned u; /* Local index variable */
char name[32]; /* Dataset name */
herr_t ret;
-
+
/* Output message about test being performed */
MESSAGE(5, ("Testing Low-Level File Free Space\n"));
@@ -1179,11 +1179,11 @@ test_file_freespace(void)
/* Create a dataset creation property list */
dcpl = H5Pcreate(H5P_DATASET_CREATE);
- CHECK(dcpl, FAIL, "H5Pcreate");
+ CHECK(dcpl, FAIL, "H5Pcreate");
/* Set the space allocation time to early */
ret = H5Pset_alloc_time(dcpl,H5D_ALLOC_TIME_EARLY);
- CHECK(ret, FAIL, "H5Pset_alloc_time");
+ CHECK(ret, FAIL, "H5Pset_alloc_time");
/* Create datasets in file */
for(u=0; u<10; u++) {
@@ -1236,12 +1236,12 @@ test_file_freespace(void)
/****************************************************************
**
-** test_file_ishdf5(): low-level file test routine.
+** test_file_ishdf5(): low-level file test routine.
** This test checks whether the H5Fis_hdf5() routine is working
** correctly in variuous situations.
**
*****************************************************************/
-static void
+static void
test_file_ishdf5(void)
{
hid_t file; /* File opened with read-write permission */
@@ -1252,7 +1252,7 @@ test_file_ishdf5(void)
unsigned char buf[1024]; /* Buffer of data to write */
htri_t status; /* Whether a file is an HDF5 file */
herr_t ret;
-
+
/* Output message about test being performed */
MESSAGE(5, ("Testing Detection of HDF5 Files\n"));
@@ -1317,12 +1317,12 @@ test_file_ishdf5(void)
/****************************************************************
**
-** test_file_open_dot(): low-level file test routine.
+** test_file_open_dot(): low-level file test routine.
** This test checks whether opening objects with "." for a name
** works correctly in variuous situations.
**
*****************************************************************/
-static void
+static void
test_file_open_dot(void)
{
hid_t fid; /* File ID */
@@ -1331,7 +1331,7 @@ test_file_open_dot(void)
hid_t sid; /* Dataspace ID */
hid_t tid, tid2; /* Datatype IDs */
herr_t ret;
-
+
/* Output message about test being performed */
MESSAGE(5, ("Testing opening objects with \".\" for a name\n"));
@@ -1440,12 +1440,12 @@ test_file_open_dot(void)
/****************************************************************
**
-** test_file_open_overlap(): low-level file test routine.
+** test_file_open_overlap(): low-level file test routine.
** This test checks whether opening files in an overlapping way
** (as opposed to a nested manner) works correctly.
**
*****************************************************************/
-static void
+static void
test_file_open_overlap(void)
{
hid_t fid1, fid2;
@@ -1454,7 +1454,7 @@ test_file_open_overlap(void)
hid_t sid;
int nobjs; /* # of open objects */
herr_t ret; /* Generic return value */
-
+
/* Output message about test being performed */
MESSAGE(5, ("Testing opening overlapping file opens\n"));
@@ -1518,11 +1518,11 @@ test_file_open_overlap(void)
/****************************************************************
**
-** test_file_getname(): low-level file test routine.
+** test_file_getname(): low-level file test routine.
** This test checks whether H5Fget_name works correctly.
**
*****************************************************************/
-static void
+static void
test_file_getname(void)
{
/* Compound datatype */
@@ -1534,20 +1534,20 @@ test_file_getname(void)
hid_t file_id;
hid_t group_id;
hid_t dataset_id;
- hid_t space_id;
+ hid_t space_id;
hid_t type_id;
hid_t attr_id;
hsize_t dims[TESTA_RANK] = {TESTA_NX, TESTA_NY};
char name[TESTA_NAME_BUF_SIZE];
ssize_t name_len;
herr_t ret; /* Generic return value */
-
+
/* Output message about test being performed */
MESSAGE(5, ("Testing H5Fget_name() functionality\n"));
/* Create a new file_id using default properties. */
file_id = H5Fcreate(FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT );
- CHECK(file_id, FAIL, "H5Fcreate");
+ CHECK(file_id, FAIL, "H5Fcreate");
/* Get and verify file name */
name_len = H5Fget_name(file_id, name, TESTA_NAME_BUF_SIZE);
@@ -1556,7 +1556,7 @@ test_file_getname(void)
/* Create a group in the root group */
group_id = H5Gcreate(file_id, TESTA_GROUPNAME, 0);
- CHECK(group_id, FAIL, "H5Gcreate");
+ CHECK(group_id, FAIL, "H5Gcreate");
/* Get and verify file name */
name_len = H5Fget_name(group_id, name, TESTA_NAME_BUF_SIZE);
@@ -1565,9 +1565,9 @@ test_file_getname(void)
/* Create the data space */
space_id = H5Screate_simple(TESTA_RANK, dims, NULL);
- CHECK(space_id, FAIL, "H5Screate_simple");
+ CHECK(space_id, FAIL, "H5Screate_simple");
- /* Try get file name from data space. Supposed to fail because
+ /* Try get file name from data space. Supposed to fail because
* it's illegal operation. */
H5E_BEGIN_TRY {
name_len = H5Fget_name(space_id, name, TESTA_NAME_BUF_SIZE);
@@ -1576,7 +1576,7 @@ test_file_getname(void)
/* Create a new dataset */
dataset_id = H5Dcreate(file_id, TESTA_DSETNAME, H5T_NATIVE_INT, space_id, H5P_DEFAULT);
- CHECK(dataset_id, FAIL, "H5Dcreate");
+ CHECK(dataset_id, FAIL, "H5Dcreate");
/* Get and verify file name */
name_len = H5Fget_name(dataset_id, name, TESTA_NAME_BUF_SIZE);
@@ -1594,18 +1594,18 @@ test_file_getname(void)
/* Create a compound datatype */
type_id = H5Tcreate(H5T_COMPOUND, sizeof(s1_t));
- CHECK(type_id, FAIL, "H5Tcreate");
+ CHECK(type_id, FAIL, "H5Tcreate");
/* Insert fields */
ret = H5Tinsert (type_id, "a", HOFFSET(s1_t,a), H5T_NATIVE_INT);
- CHECK(ret, FAIL, "H5Tinsert");
+ CHECK(ret, FAIL, "H5Tinsert");
ret = H5Tinsert (type_id, "b", HOFFSET(s1_t,b), H5T_NATIVE_FLOAT);
- CHECK(ret, FAIL, "H5Tinsert");
-
+ CHECK(ret, FAIL, "H5Tinsert");
+
/* Save it on file */
ret = H5Tcommit(file_id, TESTA_DTYPENAME, type_id);
- CHECK(ret, FAIL, "H5Tcommit");
+ CHECK(ret, FAIL, "H5Tcommit");
/* Get and verify file name */
name_len = H5Fget_name(type_id, name, TESTA_NAME_BUF_SIZE);
@@ -1636,9 +1636,9 @@ test_file_getname(void)
/****************************************************************
**
** test_file(): Main low-level file I/O test routine.
-**
+**
****************************************************************/
-void
+void
test_file(void)
{
/* Output message about test being performed */
@@ -1646,9 +1646,9 @@ test_file(void)
test_file_create(); /* Test file creation(also creation templates)*/
test_file_open(); /* Test file opening */
-#ifndef H5_NO_SHARED_WRITING
+#ifndef H5_NO_SHARED_WRITING
test_file_close(); /* Test file close behavior */
-#endif /* H5_NO_SHARED_WRITING */
+#endif /* H5_NO_SHARED_WRITING */
test_get_file_id(); /* Test H5Iget_file_id */
test_file_perm(); /* Test file access permissions */
test_file_freespace(); /* Test file free space information */
diff --git a/test/tgenprop.c b/test/tgenprop.c
index 06f89ab..da72641 100644
--- a/test/tgenprop.c
+++ b/test/tgenprop.c
@@ -64,9 +64,9 @@ double prop4_def=1.41; /* Property 4 default value */
**
** test_genprop_basic_class(): Test basic generic property list code.
** Tests creating new generic classes.
-**
+**
****************************************************************/
-static void
+static void
test_genprop_basic_class(void)
{
hid_t cid1; /* Generic Property class ID */
@@ -153,9 +153,9 @@ test_genprop_basic_class(void)
**
** test_genprop_basic_class_prop(): Test basic generic property list code.
** Tests adding properties to generic classes.
-**
+**
****************************************************************/
-static void
+static void
test_genprop_basic_class_prop(void)
{
hid_t cid1; /* Generic Property class ID */
@@ -300,9 +300,9 @@ test_genprop_basic_class_prop(void)
/****************************************************************
**
** test_genprop_iter1(): Property iterator for test_genprop_class_iter
-**
+**
****************************************************************/
-static int
+static int
test_genprop_iter1(hid_t id, const char *name, void *iter_data)
{
struct { /* Struct for iterations */
@@ -320,9 +320,9 @@ test_genprop_iter1(hid_t id, const char *name, void *iter_data)
**
** test_genprop_class_iter(): Test basic generic property list code.
** Tests iterating over properties in a generic class.
-**
+**
****************************************************************/
-static void
+static void
test_genprop_class_iter(void)
{
hid_t cid1; /* Generic Property class ID */
@@ -403,9 +403,9 @@ test_genprop_class_iter(void)
/****************************************************************
**
** test_genprop_cls_cb1(): Property List callback for test_genprop_class_callback
-**
+**
****************************************************************/
-static herr_t
+static herr_t
test_genprop_cls_cb1(hid_t list_id, void *create_data)
{
struct { /* Struct for iterations */
@@ -419,7 +419,7 @@ test_genprop_cls_cb1(hid_t list_id, void *create_data)
return(SUCCEED);
}
-static herr_t
+static herr_t
test_genprop_cls_cb2(hid_t new_list_id, hid_t UNUSED old_list_id, void *create_data)
{
struct { /* Struct for iterations */
@@ -436,9 +436,9 @@ test_genprop_cls_cb2(hid_t new_list_id, hid_t UNUSED old_list_id, void *create_d
**
** test_genprop_class_callback(): Test basic generic property list code.
** Tests callbacks for property lists in a generic class.
-**
+**
****************************************************************/
-static void
+static void
test_genprop_class_callback(void)
{
hid_t cid1; /* Generic Property class ID */
@@ -552,9 +552,9 @@ test_genprop_class_callback(void)
**
** test_genprop_basic_list(): Test basic generic property list code.
** Tests creating new generic property lists.
-**
+**
****************************************************************/
-static void
+static void
test_genprop_basic_list(void)
{
hid_t cid1; /* Generic Property class ID */
@@ -662,9 +662,9 @@ test_genprop_basic_list(void)
** test_genprop_basic_list_prop(): Test basic generic property list code.
** Tests creating new generic property lists and adding and
** removing properties from them.
-**
+**
****************************************************************/
-static void
+static void
test_genprop_basic_list_prop(void)
{
hid_t cid1; /* Generic Property class ID */
@@ -807,9 +807,9 @@ test_genprop_basic_list_prop(void)
/****************************************************************
**
** test_genprop_iter2(): Property iterator for test_genprop_list_iter
-**
+**
****************************************************************/
-static int
+static int
test_genprop_iter2(hid_t id, const char *name, void *iter_data)
{
struct { /* Struct for iterations */
@@ -827,9 +827,9 @@ test_genprop_iter2(hid_t id, const char *name, void *iter_data)
**
** test_genprop_list_iter(): Test basic generic property list code.
** Tests iterating over generic property list properties.
-**
+**
****************************************************************/
-static void
+static void
test_genprop_list_iter(void)
{
hid_t cid1; /* Generic Property class ID */
@@ -972,9 +972,9 @@ prop_cb_info prop2_cb_info; /* Callback statistics for property #2 */
/****************************************************************
**
** test_genprop_prop_crt_cb1(): Property creation callback for test_genprop_list_callback
-**
+**
****************************************************************/
-static herr_t
+static herr_t
test_genprop_prop_crt_cb1(const char *name, size_t size, void *def_value)
{
/* Set the information from the creation call */
@@ -989,9 +989,9 @@ test_genprop_prop_crt_cb1(const char *name, size_t size, void *def_value)
/****************************************************************
**
** test_genprop_prop_set_cb1(): Property set callback for test_genprop_list_callback
-**
+**
****************************************************************/
-static herr_t
+static herr_t
test_genprop_prop_set_cb1(hid_t plist_id, const char *name, size_t size, void *value)
{
/* Set the information from the set call */
@@ -1009,9 +1009,9 @@ test_genprop_prop_set_cb1(hid_t plist_id, const char *name, size_t size, void *v
/****************************************************************
**
** test_genprop_prop_get_cb1(): Property get callback for test_genprop_list_callback
-**
+**
****************************************************************/
-static herr_t
+static herr_t
test_genprop_prop_get_cb1(hid_t plist_id, const char *name, size_t size, void *value)
{
/* Set the information from the get call */
@@ -1029,9 +1029,9 @@ test_genprop_prop_get_cb1(hid_t plist_id, const char *name, size_t size, void *v
/****************************************************************
**
** test_genprop_prop_cop_cb1(): Property copy callback for test_genprop_list_callback
-**
+**
****************************************************************/
-static herr_t
+static herr_t
test_genprop_prop_cop_cb1(const char *name, size_t size, void *value)
{
/* Set the information from the get call */
@@ -1049,9 +1049,9 @@ test_genprop_prop_cop_cb1(const char *name, size_t size, void *value)
/****************************************************************
**
** test_genprop_prop_cmp_cb1(): Property comparison callback for test_genprop_list_callback
-**
+**
****************************************************************/
-static int
+static int
test_genprop_prop_cmp_cb1(const void UNUSED *value1, const void UNUSED *value2, size_t UNUSED size)
{
/* Set the information from the comparison call */
@@ -1064,9 +1064,9 @@ test_genprop_prop_cmp_cb1(const void UNUSED *value1, const void UNUSED *value2,
/****************************************************************
**
** test_genprop_prop_cls_cb1(): Property close callback for test_genprop_list_callback
-**
+**
****************************************************************/
-static herr_t
+static herr_t
test_genprop_prop_cls_cb1(const char *name, size_t size, void *value)
{
/* Set the information from the close call */
@@ -1083,9 +1083,9 @@ test_genprop_prop_cls_cb1(const char *name, size_t size, void *value)
/****************************************************************
**
** test_genprop_prop_del_cb2(): Property delete callback for test_genprop_list_callback
-**
+**
****************************************************************/
-static herr_t
+static herr_t
test_genprop_prop_del_cb2(hid_t plist_id, const char *name, size_t size, void *value)
{
/* Set the information from the delete call */
@@ -1102,9 +1102,9 @@ test_genprop_prop_del_cb2(hid_t plist_id, const char *name, size_t size, void *v
**
** test_genprop_list_callback(): Test basic generic property list code.
** Tests callbacks for properties in a generic property list.
-**
+**
****************************************************************/
-static void
+static void
test_genprop_list_callback(void)
{
hid_t cid1; /* Generic Property class ID */
@@ -1313,9 +1313,9 @@ test_genprop_list_callback(void)
** test_genprop_list_addprop(): Test adding properties to a
** standard HDF5 property list and verify that the library
** ignores the extra properties.
-**
+**
****************************************************************/
-static void
+static void
test_genprop_list_addprop(void)
{
hid_t fid; /* File ID */
@@ -1336,7 +1336,7 @@ test_genprop_list_addprop(void)
/* Create a dataset creation property list */
pid = H5Pcreate(H5P_DATASET_CREATE);
CHECK(pid, FAIL, "H5Pcreate");
-
+
/* Insert temporary property into class (with no callbacks) */
#ifdef H5_WANT_H5_V1_6_COMPAT
ret = H5Pinsert(pid,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL);
@@ -1370,11 +1370,11 @@ test_genprop_list_addprop(void)
/* Close property list */
ret = H5Pclose(pid);
CHECK(ret, FAIL, "H5Pclose");
-
+
/* Close disk dataspace */
ret = H5Sclose(sid);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close Dataset */
ret = H5Dclose(did);
CHECK(ret, FAIL, "H5Dclose");
@@ -1391,9 +1391,9 @@ test_genprop_list_addprop(void)
** standard HDF5 property class and verify that the library
** ignores the extra properties and continues to recognize the
** derived class as a valid version of the derived-from class.
-**
+**
****************************************************************/
-static void
+static void
test_genprop_class_addprop(void)
{
hid_t fid; /* File ID */
@@ -1431,7 +1431,7 @@ test_genprop_class_addprop(void)
/* Create a derived dataset creation property list */
pid = H5Pcreate(cid);
CHECK(pid, FAIL, "H5Pcreate");
-
+
/* Check existence of an original property */
ret = H5Pexist(pid,H5D_CRT_DATA_PIPELINE_NAME);
VERIFY(ret, 1, "H5Pexist");
@@ -1461,15 +1461,15 @@ test_genprop_class_addprop(void)
/* Close property class */
ret = H5Pclose_class(cid);
CHECK(ret, FAIL, "H5Pclose");
-
+
/* Close property list */
ret = H5Pclose(pid);
CHECK(ret, FAIL, "H5Pclose");
-
+
/* Close disk dataspace */
ret = H5Sclose(sid);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close Dataset */
ret = H5Dclose(did);
CHECK(ret, FAIL, "H5Dclose");
@@ -1484,9 +1484,9 @@ test_genprop_class_addprop(void)
**
** test_genprop_equal(): Test basic generic property list code.
** More tests for H5Pequal()
-**
+**
****************************************************************/
-static void
+static void
test_genprop_equal(void)
{
hid_t cid1; /* Generic Property class ID */
@@ -1539,9 +1539,9 @@ test_genprop_equal(void)
**
** test_genprop_path(): Test basic generic property list code.
** Tests for class paths
-**
+**
****************************************************************/
-static void
+static void
test_genprop_path(void)
{
hid_t cid1; /* Generic Property class ID */
@@ -1619,9 +1619,9 @@ test_genprop_path(void)
**
** test_genprop_refcount(): Test basic generic property list code.
** Tests for correct reference counting
-**
+**
****************************************************************/
-static void
+static void
test_genprop_refcount(void)
{
hid_t cid1; /* Generic Property class ID */
@@ -1694,9 +1694,9 @@ test_genprop_refcount(void)
/****************************************************************
**
** test_genprop(): Main generic property testing routine.
-**
+**
****************************************************************/
-void
+void
test_genprop(void)
{
/* Output message about test being performed */
diff --git a/test/th5s.c b/test/th5s.c
index 763fc81..9b82c6f 100644
--- a/test/th5s.c
+++ b/test/th5s.c
@@ -82,9 +82,9 @@ struct space4_struct {
/****************************************************************
**
** test_h5s_basic(): Test basic H5S (dataspace) code.
-**
+**
****************************************************************/
-static void
+static void
test_h5s_basic(void)
{
hid_t fid1; /* HDF5 File IDs */
@@ -318,17 +318,17 @@ test_h5s_null(void)
hsize_t dims[1]={10}; /* Dimensions for converting null dataspace to simple */
H5S_class_t space_type; /* Type of dataspace */
herr_t ret; /* Generic return value */
-
+
/* Output message about test being performed */
MESSAGE(5, ("Testing Null Dataspace\n"));
-
+
/* Create the file */
fid = H5Fcreate(NULLFILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
CHECK(fid, FAIL, "H5Fcreate");
sid = H5Screate(H5S_NULL);
CHECK(sid, FAIL, "H5Screate");
-
+
/* Check that the null dataspace actually has 0 elements */
nelem = H5Sget_simple_extent_npoints(sid);
VERIFY(nelem, 0, "H5Sget_simple_extent_npoints");
@@ -370,7 +370,7 @@ test_h5s_null(void)
/* Create first dataset */
did = H5Dcreate(fid, NULLDATASET, H5T_NATIVE_UINT, sid, H5P_DEFAULT);
CHECK(did, FAIL, "H5Dcreate");
-
+
/* Write "nothing" to the dataset */
ret = H5Dwrite(did, H5T_NATIVE_UINT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &uval);
CHECK(ret, FAIL, "H5Dwrite");
@@ -392,7 +392,7 @@ test_h5s_null(void)
/* Create an attribute for the group */
attr=H5Acreate(did,NULLATTR,H5T_NATIVE_INT,sid,H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate");
-
+
/* Write "nothing" to the attribute */
ret = H5Awrite(attr, H5T_NATIVE_INT, &val);
CHECK(ret, FAIL, "H5Awrite");
@@ -414,7 +414,7 @@ test_h5s_null(void)
/* Close attribute */
ret=H5Aclose(attr);
CHECK(ret, FAIL, "H5Aclose");
-
+
/* Close the dataset */
ret = H5Dclose(did);
CHECK(ret, FAIL, "H5Dclose");
@@ -438,11 +438,11 @@ test_h5s_null(void)
/* Close the file */
ret = H5Fclose(fid);
CHECK(ret, FAIL, "H5Fclose");
-
+
/*============================================
- * Reopen the file to check the data space
+ * Reopen the file to check the data space
*============================================
- */
+ */
fid = H5Fopen(NULLFILE, H5F_ACC_RDONLY, H5P_DEFAULT);
CHECK(fid, FAIL, "H5Fopen");
@@ -474,7 +474,7 @@ test_h5s_null(void)
/* Close the dataspace */
ret = H5Sclose(dset_sid);
CHECK(ret, FAIL, "H5Sclose");
-
+
ret = H5Sclose(dset_sid2);
CHECK(ret, FAIL, "H5Sclose");
@@ -485,7 +485,7 @@ test_h5s_null(void)
/* Get the space of the dataset */
attr_sid = H5Aget_space(attr);
CHECK(attr_sid, FAIL, "H5Aget_space");
-
+
/* Verify the class type of dataspace */
stype = H5Sget_simple_extent_type(attr_sid);
VERIFY(stype, H5S_NULL, "H5Sget_simple_extent_type");
@@ -493,11 +493,11 @@ test_h5s_null(void)
/* Verify there is zero element in the dataspace */
ret = (herr_t)H5Sget_simple_extent_npoints(attr_sid);
VERIFY(ret, 0, "H5Sget_simple_extent_npoints");
-
+
/* Close the dataspace */
ret = H5Sclose(attr_sid);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Try reading from the attribute (make certain our buffer is unmodified) */
ret = H5Aread(attr, H5T_NATIVE_INT, &val);
CHECK(ret, FAIL, "H5Aread");
@@ -506,11 +506,11 @@ test_h5s_null(void)
/* Close attribute */
ret=H5Aclose(attr);
CHECK(ret, FAIL, "H5Aclose");
-
+
/* Close the dataset */
ret = H5Dclose(did);
CHECK(ret, FAIL, "H5Dclose");
-
+
/* Close the file */
ret = H5Fclose(fid);
CHECK(ret, FAIL, "H5Fclose");
@@ -519,9 +519,9 @@ test_h5s_null(void)
/****************************************************************
**
** test_h5s_encode(): Test H5S (dataspace) encoding and decoding.
-**
+**
****************************************************************/
-static void
+static void
test_h5s_encode(void)
{
hid_t sid1, sid2, sid3; /* Dataspace ID */
@@ -600,17 +600,17 @@ test_h5s_encode(void)
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
ret = H5Sclose(decoded_sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/*-------------------------------------------------------------------------
* Test encoding and decoding of null dataspace.
*-------------------------------------------------------------------------
*/
sid2 = H5Screate(H5S_NULL);
CHECK(sid2, FAIL, "H5Screate");
-
+
/* Encode null data space in a buffer */
ret = H5Sencode(sid2, NULL, &null_size);
CHECK(ret, FAIL, "H5Sencode");
@@ -628,10 +628,10 @@ test_h5s_encode(void)
/* Verify decoded dataspace */
space_type = H5Sget_simple_extent_type(decoded_sid2);
VERIFY(space_type, H5S_NULL, "H5Sget_simple_extent_type");
-
+
ret = H5Sclose(sid2);
CHECK(ret, FAIL, "H5Sclose");
-
+
ret = H5Sclose(decoded_sid2);
CHECK(ret, FAIL, "H5Sclose");
@@ -672,7 +672,7 @@ test_h5s_encode(void)
ret = H5Sclose(sid3);
CHECK(ret, FAIL, "H5Sclose");
-
+
ret = H5Sclose(decoded_sid3);
CHECK(ret, FAIL, "H5Sclose");
@@ -684,9 +684,9 @@ test_h5s_encode(void)
/****************************************************************
**
** test_h5s_scalar_write(): Test scalar H5S (dataspace) writing code.
-**
+**
****************************************************************/
-static void
+static void
test_h5s_scalar_write(void)
{
hid_t fid1; /* HDF5 File IDs */
@@ -747,9 +747,9 @@ test_h5s_scalar_write(void)
/****************************************************************
**
** test_h5s_scalar_read(): Test scalar H5S (dataspace) reading code.
-**
+**
****************************************************************/
-static void
+static void
test_h5s_scalar_read(void)
{
hid_t fid1; /* HDF5 File IDs */
@@ -794,7 +794,7 @@ test_h5s_scalar_read(void)
ret = H5Dread(dataset, H5T_NATIVE_UINT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &rdata);
CHECK(ret, FAIL, "H5Dread");
VERIFY(rdata, space3_data, "H5Dread");
-
+
/* Close Dataset */
ret = H5Dclose(dataset);
CHECK(ret, FAIL, "H5Dclose");
@@ -812,9 +812,9 @@ test_h5s_scalar_read(void)
**
** test_h5s_compound_scalar_write(): Test scalar H5S (dataspace) writing for
** compound datatypes.
-**
+**
****************************************************************/
-static void
+static void
test_h5s_compound_scalar_write(void)
{
hid_t fid1; /* HDF5 File IDs */
@@ -892,9 +892,9 @@ test_h5s_compound_scalar_write(void)
**
** test_h5s_compound_scalar_read(): Test scalar H5S (dataspace) reading for
** compound datatypes.
-**
+**
****************************************************************/
-static void
+static void
test_h5s_compound_scalar_read(void)
{
hid_t fid1; /* HDF5 File IDs */
@@ -934,7 +934,7 @@ test_h5s_compound_scalar_read(void)
type=H5Dget_type(dataset);
CHECK(type, FAIL, "H5Dget_type");
-
+
ret = H5Dread(dataset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, &rdata);
CHECK(ret, FAIL, "H5Dread");
if(HDmemcmp(&space4_data,&rdata,sizeof(struct space4_struct))) {
@@ -943,7 +943,7 @@ test_h5s_compound_scalar_read(void)
printf("scalar data different: space4_data.f=%f, read_data4.f=%f\n",space4_data.f,rdata.f);
TestErrPrintf("scalar data different: space4_data.c1=%c, read_data4.c1=%c\n",space4_data.c1,rdata.c2);
} /* end if */
-
+
/* Close Dataset */
ret = H5Dclose(dataset);
CHECK(ret, FAIL, "H5Dclose");
@@ -966,9 +966,9 @@ float chunk_data_flt[50000][3];
** test_h5s_chunk(): Exercise chunked I/O, testing when data conversion
** is necessary and the entire chunk read in doesn't fit into the
** conversion buffer
-**
+**
****************************************************************/
-static void
+static void
test_h5s_chunk(void)
{
herr_t status;
@@ -1046,9 +1046,9 @@ test_h5s_chunk(void)
/****************************************************************
**
** test_h5s(): Main H5S (dataspace) testing routine.
-**
+**
****************************************************************/
-void
+void
test_h5s(void)
{
/* Output message about test being performed */
diff --git a/test/theap.c b/test/theap.c
index 8e5105a..3ceb167 100644
--- a/test/theap.c
+++ b/test/theap.c
@@ -82,9 +82,9 @@ static int tst_inc_sort(const void *_i1, const void *_i2)
**
** test_heap_init(): Test H5HP (heap) code.
** Initialize data for Heap testing
-**
+**
****************************************************************/
-static void
+static void
test_heap_init(void)
{
time_t curr_time; /* Current time, for seeding random number generator */
@@ -110,9 +110,9 @@ test_heap_init(void)
**
** test_heap_create(): Test basic H5HP (heap) code.
** Tests creating and closing heaps.
-**
+**
****************************************************************/
-static void
+static void
test_heap_create(void)
{
H5HP_t *heap; /* Heap created */
@@ -143,9 +143,9 @@ test_heap_create(void)
**
** test_heap_insert_min(): Test H5HP (heap) code.
** Tests basic inserting objects into minimum heaps.
-**
+**
****************************************************************/
-static void
+static void
test_heap_insert_min(void)
{
H5HP_t *heap; /* Heap created */
@@ -217,9 +217,9 @@ test_heap_insert_min(void)
**
** test_heap_insert(): Test H5HP (heap) code.
** Tests basic inserting objects into maximum heaps.
-**
+**
****************************************************************/
-static void
+static void
test_heap_insert_max(void)
{
H5HP_t *heap; /* Heap created */
@@ -291,9 +291,9 @@ test_heap_insert_max(void)
**
** test_heap_insert(): Test H5HP (heap) code.
** Tests basic inserting objects into heaps.
-**
+**
****************************************************************/
-static void
+static void
test_heap_insert(void)
{
/* Output message about test being performed */
@@ -308,7 +308,7 @@ test_heap_insert(void)
**
** test_heap_insert_many_core (): Tests H5HP (heap) code.
** "Core" routine called by test_heap_insert_many() routine.
-**
+**
****************************************************************/
static void test_heap_insert_many_core(H5HP_type_t heap_type, test_obj *arr, size_t nelem, int top_val)
{
@@ -351,9 +351,9 @@ static void test_heap_insert_many_core(H5HP_type_t heap_type, test_obj *arr, siz
**
** test_heap_insert_many (): Test H5HP (heap) code.
** Tests inserting many objects into heaps.
-**
+**
****************************************************************/
-static void
+static void
test_heap_insert_many(void)
{
/* Output message about test being performed */
@@ -383,9 +383,9 @@ test_heap_insert_many(void)
**
** test_heap_remove_min(): Test H5HP (heap) code.
** Tests basic removal of objects from minimum heaps.
-**
+**
****************************************************************/
-static void
+static void
test_heap_remove_min(void)
{
H5HP_t *heap; /* Heap created */
@@ -457,9 +457,9 @@ test_heap_remove_min(void)
**
** test_heap_remove_max(): Test H5HP (heap) code.
** Tests basic removal of objects from maximum heaps.
-**
+**
****************************************************************/
-static void
+static void
test_heap_remove_max(void)
{
H5HP_t *heap; /* Heap created */
@@ -531,9 +531,9 @@ test_heap_remove_max(void)
**
** test_heap_remove(): Test H5HP (heap) code.
** Tests basic removal of objects from minimum & maximum heaps.
-**
+**
****************************************************************/
-static void
+static void
test_heap_remove(void)
{
/* Output message about test being performed */
@@ -548,7 +548,7 @@ test_heap_remove(void)
**
** test_heap_remove_many_core (): Tests H5HP (heap) code.
** "Core" routine called by test_heap_remove_many() routine.
-**
+**
****************************************************************/
static void test_heap_remove_many_core(H5HP_type_t heap_type, test_obj *arr, size_t nelem)
{
@@ -661,9 +661,9 @@ static void test_heap_remove_many_core(H5HP_type_t heap_type, test_obj *arr, siz
**
** test_heap_remove_many (): Test H5HP (heap) code.
** Tests removing many objects into heaps.
-**
+**
****************************************************************/
-static void
+static void
test_heap_remove_many(void)
{
/* Output message about test being performed */
@@ -693,9 +693,9 @@ test_heap_remove_many(void)
**
** test_heap_change_min (): Test H5HP (heap) code.
** Tests changing the priority of an object in a minimum heap
-**
+**
****************************************************************/
-static void
+static void
test_heap_change_min(void)
{
H5HP_t *heap; /* Heap created */
@@ -767,9 +767,9 @@ test_heap_change_min(void)
**
** test_heap_change_max (): Test H5HP (heap) code.
** Tests changing the priority of an object in a maximumheap
-**
+**
****************************************************************/
-static void
+static void
test_heap_change_max(void)
{
H5HP_t *heap; /* Heap created */
@@ -841,9 +841,9 @@ test_heap_change_max(void)
**
** test_heap_change (): Test H5HP (heap) code.
** Tests changing the priority of an object in maximum & minimum heaps
-**
+**
****************************************************************/
-static void
+static void
test_heap_change(void)
{
/* Output message about test being performed */
@@ -859,9 +859,9 @@ test_heap_change(void)
** test_heap_incdec_min (): Test H5HP (heap) code.
** Tests incrementing & decrementing priority of objects on
** a minimum heap.
-**
+**
****************************************************************/
-static void
+static void
test_heap_incdec_min(void)
{
H5HP_t *heap; /* Heap created */
@@ -934,9 +934,9 @@ test_heap_incdec_min(void)
** test_heap_incdec_max (): Test H5HP (heap) code.
** Tests incrementing & decrementing priority of objects on
** a maximum heap.
-**
+**
****************************************************************/
-static void
+static void
test_heap_incdec_max(void)
{
H5HP_t *heap; /* Heap created */
@@ -1009,9 +1009,9 @@ test_heap_incdec_max(void)
** test_heap_incdec (): Test H5HP (heap) code.
** Tests incrementing & decrementing priority of objects on
** maximum & minimum heaps.
-**
+**
****************************************************************/
-static void
+static void
test_heap_incdec(void)
{
/* Output message about test being performed */
@@ -1025,7 +1025,7 @@ test_heap_incdec(void)
/****************************************************************
**
** test_heap(): Main H5HP testing routine.
-**
+**
****************************************************************/
void
test_heap(void)
diff --git a/test/tid.c b/test/tid.c
index 5d35607..ad72aef 100644
--- a/test/tid.c
+++ b/test/tid.c
@@ -69,7 +69,7 @@ static int basic_id_test(void)
VERIFY(testPtr, NULL, "H5Iobject_verify");
if(testPtr != NULL)
goto out;
-
+
/* Register a type */
myType = H5Iregister_type(64, 0, (H5I_free_t) free );
@@ -410,7 +410,7 @@ out:
/* Cleanup. For simplicity, just destroy all types and ignore errors. */
H5E_BEGIN_TRY
for(i = H5I_NTYPES; i < MAX_NUM_TYPES; i++)
- H5Idestroy_type((H5I_type_t) i);
+ H5Idestroy_type((H5I_type_t) i);
H5E_END_TRY
return -1;
}
diff --git a/test/titerate.c b/test/titerate.c
index b883ba3..2a3a599 100644
--- a/test/titerate.c
+++ b/test/titerate.c
@@ -66,7 +66,7 @@ herr_t aiter_cb(hid_t loc_id, const char *name, void *op_data);
/****************************************************************
**
** iter_strcmp(): String comparison routine for qsort
-**
+**
****************************************************************/
int iter_strcmp(const void *s1, const void *s2)
{
@@ -76,7 +76,7 @@ int iter_strcmp(const void *s1, const void *s2)
/****************************************************************
**
** giter_cb(): Custom group iteration callback routine.
-**
+**
****************************************************************/
herr_t giter_cb(hid_t UNUSED group, const char *name, void *op_data)
{
@@ -105,7 +105,7 @@ herr_t giter_cb(hid_t UNUSED group, const char *name, void *op_data)
/****************************************************************
**
** test_iter_group(): Test group iteration functionality
-**
+**
****************************************************************/
static void test_iter_group(void)
{
@@ -155,22 +155,22 @@ static void test_iter_group(void)
CHECK(ret, FAIL, "H5Dclose");
}
- /* Create a group and named datatype under root group for testing
+ /* Create a group and named datatype under root group for testing
* H5Gget_objtype_by_idx.
*/
grp = H5Gcreate(file, "grp", 0);
CHECK(ret, FAIL, "H5Gcreate");
- ret = H5Tcommit(file, "dtype", datatype);
+ ret = H5Tcommit(file, "dtype", datatype);
CHECK(ret, FAIL, "H5Tcommit");
-
+
/* Close everything up */
ret=H5Tclose(datatype);
CHECK(ret, FAIL, "H5Tclose");
-
+
ret=H5Gclose(grp);
CHECK(ret, FAIL, "H5Gclose");
-
+
ret=H5Sclose(filespace);
CHECK(ret, FAIL, "H5Sclose");
@@ -195,20 +195,20 @@ static void test_iter_group(void)
ret = H5Gget_num_objs(root_group, &num_membs);
CHECK(ret, FAIL, "H5Gget_num_objs");
VERIFY(num_membs,NDATASETS+2,"H5Gget_num_objs");
-
+
for(i=0; i< (int)num_membs; i++) {
H5G_obj_t obj_type; /* Type of object in file */
ret = (herr_t)H5Gget_objname_by_idx(root_group, (hsize_t)i, dataset_name, NAMELEN);
CHECK(ret, FAIL, "H5Gget_objname_by_idx");
-
+
obj_type = H5Gget_objtype_by_idx(root_group, (hsize_t)i);
CHECK(obj_type, H5G_UNKNOWN, "H5Gget_objtype_by_idx");
}
-
+
H5E_BEGIN_TRY {
ret = (herr_t)H5Gget_objname_by_idx(root_group, (hsize_t)(NDATASETS+3), dataset_name, NAMELEN);
- } H5E_END_TRY;
+ } H5E_END_TRY;
VERIFY(ret, FAIL, "H5Gget_objname_by_idx");
ret = H5Gclose(root_group);
@@ -223,20 +223,20 @@ static void test_iter_group(void)
ret = H5Gget_num_objs(file, &num_membs);
CHECK(ret, FAIL, "H5Gget_num_objs");
VERIFY(num_membs,NDATASETS+2,"H5Gget_num_objs");
-
+
for(i=0; i< (int)num_membs; i++) {
H5G_obj_t obj_type; /* Type of object in file */
ret = (herr_t)H5Gget_objname_by_idx(file, (hsize_t)i, dataset_name, NAMELEN);
CHECK(ret, FAIL, "H5Gget_objname_by_idx");
-
+
obj_type = H5Gget_objtype_by_idx(file, (hsize_t)i);
CHECK(obj_type, H5G_UNKNOWN, "H5Gget_objtype_by_idx");
}
-
+
H5E_BEGIN_TRY {
ret = (herr_t)H5Gget_objname_by_idx(file, (hsize_t)(NDATASETS+3), dataset_name, NAMELEN);
- } H5E_END_TRY;
+ } H5E_END_TRY;
VERIFY(ret, FAIL, "H5Gget_objname_by_idx");
}
@@ -245,21 +245,21 @@ static void test_iter_group(void)
idx=-1;
H5E_BEGIN_TRY {
ret=H5Giterate(file,"/",&idx,giter_cb,&info);
- } H5E_END_TRY;
+ } H5E_END_TRY;
VERIFY(ret, FAIL, "H5Giterate");
/* Test skipping exactly as many entries as in the group */
idx=NDATASETS+2;
H5E_BEGIN_TRY {
ret=H5Giterate(file,"/",&idx,giter_cb,&info);
- } H5E_END_TRY;
+ } H5E_END_TRY;
VERIFY(ret, FAIL, "H5Giterate");
/* Test skipping more entries than are in the group */
idx=NDATASETS+3;
H5E_BEGIN_TRY {
ret=H5Giterate(file,"/",&idx,giter_cb,&info);
- } H5E_END_TRY;
+ } H5E_END_TRY;
VERIFY(ret, FAIL, "H5Giterate");
/* Test all objects in group, when callback always returns 0 */
@@ -350,7 +350,7 @@ static void test_iter_group(void)
/****************************************************************
**
** aiter_cb(): Custom group iteration callback routine.
-**
+**
****************************************************************/
herr_t aiter_cb(hid_t UNUSED group, const char *name, void *op_data)
{
@@ -379,7 +379,7 @@ herr_t aiter_cb(hid_t UNUSED group, const char *name, void *op_data)
/****************************************************************
**
** test_iter_attr(): Test attribute iteration functionality
-**
+**
****************************************************************/
static void test_iter_attr(void)
{
@@ -410,7 +410,7 @@ static void test_iter_attr(void)
dataset = H5Dcreate(file, "Dataset", datatype, filespace, H5P_DEFAULT);
CHECK(dataset, FAIL, "H5Dcreate");
-
+
for(i=0; i< NATTR; i++) {
sprintf(name,"Attribute %d",i);
attribute = H5Acreate(dataset, name, datatype, filespace, H5P_DEFAULT);
@@ -451,14 +451,14 @@ static void test_iter_attr(void)
idx=NATTR;
H5E_BEGIN_TRY {
ret=H5Aiterate(dataset,&idx,aiter_cb,&info);
- } H5E_END_TRY;
+ } H5E_END_TRY;
VERIFY(ret, FAIL, "H5Aiterate");
/* Test skipping more attributes than there are */
idx=NATTR+1;
H5E_BEGIN_TRY {
ret=H5Aiterate(dataset,&idx,aiter_cb,&info);
- } H5E_END_TRY;
+ } H5E_END_TRY;
VERIFY(ret, FAIL, "H5Aiterate");
/* Test all attributes on dataset, when callback always returns 0 */
@@ -527,7 +527,7 @@ static void test_iter_attr(void)
/****************************************************************
**
** iter_strcmp2(): String comparison routine for qsort
-**
+**
****************************************************************/
int iter_strcmp2(const void *s1, const void *s2)
{
@@ -537,7 +537,7 @@ int iter_strcmp2(const void *s1, const void *s2)
/****************************************************************
**
** giter_cb2(): Custom group iteration callback routine.
-**
+**
****************************************************************/
herr_t giter_cb2(hid_t loc_id, const char *name, void *opdata)
{
@@ -568,7 +568,7 @@ herr_t giter_cb2(hid_t loc_id, const char *name, void *opdata)
**
** test_iter_group_large(): Test group iteration functionality
** for groups with large #'s of objects
-**
+**
****************************************************************/
static void test_iter_group_large(void)
{
@@ -606,7 +606,7 @@ static void test_iter_group_large(void)
/* Create a bunch of groups */
for (i=0; i<ITER_NGROUPS; i++) {
- sprintf(gname, "Group_%d", i);
+ sprintf(gname, "Group_%d", i);
/* Add the name to the list of objects in the root group */
strcpy(names[i].name,gname);
@@ -681,9 +681,9 @@ static void test_iter_group_large(void)
/****************************************************************
**
-** test_grp_memb_funcs(): Test group member information
+** test_grp_memb_funcs(): Test group member information
** functionality
-**
+**
****************************************************************/
static void test_grp_memb_funcs(void)
{
@@ -727,28 +727,28 @@ static void test_grp_memb_funcs(void)
CHECK(ret, FAIL, "H5Dclose");
}
- /* Create a group and named datatype under root group for testing
+ /* Create a group and named datatype under root group for testing
* H5Gget_objtype_by_idx.
*/
grp = H5Gcreate(file, "grp", 0);
CHECK(ret, FAIL, "H5Gcreate");
-
+
dnames[NDATASETS]=HDstrdup("grp");
CHECK(dnames[NDATASETS], NULL, "strdup");
-
- ret = H5Tcommit(file, "dtype", datatype);
+
+ ret = H5Tcommit(file, "dtype", datatype);
CHECK(ret, FAIL, "H5Tcommit");
-
+
dnames[NDATASETS+1]=HDstrdup("dtype");
- CHECK(dnames[NDATASETS], NULL, "strdup");
-
+ CHECK(dnames[NDATASETS], NULL, "strdup");
+
/* Close everything up */
ret=H5Tclose(datatype);
CHECK(ret, FAIL, "H5Tclose");
-
+
ret=H5Gclose(grp);
CHECK(ret, FAIL, "H5Gclose");
-
+
ret=H5Sclose(filespace);
CHECK(ret, FAIL, "H5Sclose");
@@ -771,24 +771,24 @@ static void test_grp_memb_funcs(void)
ret = H5Gget_num_objs(root_group, &num_membs);
CHECK(ret, FAIL, "H5Gget_num_objs");
VERIFY(num_membs,NDATASETS+2,"H5Gget_num_objs");
-
+
for(i=0; i< (int)num_membs; i++) {
H5G_obj_t obj_type; /* Type of object in file */
/* Test with NULL for name, to query length */
name_len = H5Gget_objname_by_idx(root_group, (hsize_t)i, NULL, NAMELEN);
CHECK(name_len, FAIL, "H5Gget_objname_by_idx");
-
+
ret = (herr_t)H5Gget_objname_by_idx(root_group, (hsize_t)i, dataset_name, (size_t)(name_len+1));
CHECK(ret, FAIL, "H5Gget_objname_by_idx");
/* Double-check that the length is the same */
VERIFY(ret, name_len, "H5Gget_objname_by_idx");
-
+
/* Keep a copy of the dataset names around for later */
obj_names[i]=HDstrdup(dataset_name);
CHECK(obj_names[i], NULL, "strdup");
-
+
obj_type = H5Gget_objtype_by_idx(root_group, (hsize_t)i);
CHECK(obj_type, H5G_UNKNOWN, "H5Gget_objtype_by_idx");
@@ -799,24 +799,24 @@ static void test_grp_memb_funcs(void)
if(!HDstrncmp(dataset_name, "Dataset", 7))
VERIFY(obj_type, H5G_DATASET, "H5Gget_objname_by_idx");
}
-
+
H5E_BEGIN_TRY {
ret = (herr_t)H5Gget_objname_by_idx(root_group, (hsize_t)(NDATASETS+3), dataset_name, NAMELEN);
- } H5E_END_TRY;
+ } H5E_END_TRY;
VERIFY(ret, FAIL, "H5Gget_objname_by_idx");
/* Sort the dataset names */
qsort(obj_names,NDATASETS+2,sizeof(char *),iter_strcmp);
-
+
/* Compare object names */
for(i=0; i< (int)num_membs; i++) {
ret = HDstrcmp(dnames[i], obj_names[i]);
VERIFY(ret, 0, "HDstrcmp");
}
-
+
ret = H5Gclose(root_group);
CHECK(ret, FAIL, "H5Gclose");
-
+
ret=H5Fclose(file);
CHECK(ret, FAIL, "H5Fclose");
@@ -832,7 +832,7 @@ static void test_grp_memb_funcs(void)
/****************************************************************
**
** test_links(): Test soft and hard link iteration
-**
+**
****************************************************************/
static void test_links(void)
{
@@ -855,7 +855,7 @@ static void test_links(void)
/* create groups */
gid = H5Gcreate (file, "/g1", 0);
CHECK(gid, FAIL, "H5Gcreate");
-
+
gid1 = H5Gcreate (file, "/g1/g1.1", 0);
CHECK(gid1, FAIL, "H5Gcreate");
@@ -875,7 +875,7 @@ static void test_links(void)
/* Get object name */
name_len = H5Gget_objname_by_idx(gid, i, obj_name, NAMELEN);
CHECK(name_len, FAIL, "H5Gget_objname_by_idx");
-
+
obj_type = H5Gget_objtype_by_idx(gid, i);
CHECK(obj_type, H5G_UNKNOWN, "H5Gget_objtype_by_idx");
@@ -902,9 +902,9 @@ static void test_links(void)
/****************************************************************
**
** test_iterate(): Main iteration testing routine.
-**
+**
****************************************************************/
-void
+void
test_iterate(void)
{
/* Output message about test being performed */
diff --git a/test/tmeta.c b/test/tmeta.c
index 87fd4fd..886ded2 100644
--- a/test/tmeta.c
+++ b/test/tmeta.c
@@ -49,9 +49,9 @@ uint8_t encode_buffer[sizeof(compar_buffer)];
/****************************************************************
**
** test_metadata(): Main meta-data encode/decode testing routine.
-**
+**
****************************************************************/
-void
+void
test_metadata(void)
{
int16_t ei16 = TEST_INT16_VALUE; /* variables to hold the values to encode */
diff --git a/test/tmisc.c b/test/tmisc.c
index 84fd88a..6cc7556 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -76,37 +76,37 @@ typedef struct {
#define MISC5_DBGELVAL3 777777777
typedef struct
-{
+{
int st1_el1;
hvl_t st1_el2;
} misc5_struct1;
typedef struct
-{
+{
int st2_el1;
hvl_t st2_el2;
} misc5_struct2;
typedef struct
-{
+{
int st3_el1;
} misc5_struct3;
typedef struct
-{
+{
hid_t st3h_base;
hid_t st3h_id;
} misc5_struct3_hndl;
typedef struct
-{
+{
hid_t st2h_base;
hid_t st2h_id;
misc5_struct3_hndl *st2h_st3hndl;
} misc5_struct2_hndl;
typedef struct
-{
+{
hid_t st1h_base;
hid_t st1h_id;
misc5_struct2_hndl *st1h_st2hndl;
@@ -139,7 +139,7 @@ typedef struct
#define MISC8_DSETNAME10 "Dataset10"
#define MISC8_RANK 2
#define MISC8_DIM0 50
-#define MISC8_DIM1 50
+#define MISC8_DIM1 50
#define MISC8_CHUNK_DIM0 10
#define MISC8_CHUNK_DIM1 10
@@ -200,7 +200,7 @@ unsigned m13_rdata[MISC13_DIM1][MISC13_DIM2]; /* Data read from dataset
/* Definitions for misc. test #16 */
#define MISC16_FILE "tmisc16.h5"
-#define MISC16_SPACE_DIM 4
+#define MISC16_SPACE_DIM 4
#define MISC16_SPACE_RANK 1
#define MISC16_STR_SIZE 8
#define MISC16_DSET_NAME "Dataset"
@@ -208,8 +208,8 @@ unsigned m13_rdata[MISC13_DIM1][MISC13_DIM2]; /* Data read from dataset
/* Definitions for misc. test #17 */
#define MISC17_FILE "tmisc17.h5"
#define MISC17_SPACE_RANK 2
-#define MISC17_SPACE_DIM1 4
-#define MISC17_SPACE_DIM2 8
+#define MISC17_SPACE_DIM1 4
+#define MISC17_SPACE_DIM2 8
#define MISC17_DSET_NAME "Dataset"
/* Definitions for misc. test #18 */
@@ -529,15 +529,15 @@ test_misc3(void)
/* Create a dataset creation property list */
dcpl = H5Pcreate(H5P_DATASET_CREATE);
- CHECK(dcpl, FAIL, "H5Pcreate");
+ CHECK(dcpl, FAIL, "H5Pcreate");
/* Set the chunk information */
ret = H5Pset_chunk(dcpl,rank,chunk_dims);
- CHECK(dcpl, FAIL, "H5Pset_chunk");
+ CHECK(dcpl, FAIL, "H5Pset_chunk");
/* Set the fill-value information */
ret = H5Pset_fill_value(dcpl,H5T_NATIVE_INT,&fill);
- CHECK(dcpl, FAIL, "H5Pset_fill_value");
+ CHECK(dcpl, FAIL, "H5Pset_fill_value");
/* Create the dataset */
dataset = H5Dcreate(file, MISC3_DSET_NAME, H5T_NATIVE_INT, dataspace, dcpl);
@@ -662,7 +662,7 @@ create_struct3(void)
return(str3hndl);
}
-static void
+static void
delete_struct3(misc5_struct3_hndl *str3hndl)
{
herr_t ret; /* For error checking */
@@ -676,7 +676,7 @@ delete_struct3(misc5_struct3_hndl *str3hndl)
free(str3hndl);
}
-static void
+static void
set_struct3(misc5_struct3 *buf)
{
buf->st3_el1=MISC5_DBGELVAL3;
@@ -779,7 +779,7 @@ create_struct1(void)
static void
delete_struct1(misc5_struct1_hndl *str1hndl)
-{
+{
herr_t ret; /* For error checking */
ret=H5Tclose(str1hndl->st1h_id);
@@ -795,7 +795,7 @@ delete_struct1(misc5_struct1_hndl *str1hndl)
static void
set_struct1(misc5_struct1 *buf)
-{
+{
unsigned i; /* Local index variable */
buf->st1_el1=MISC5_DBGELVAL1;
@@ -1193,7 +1193,7 @@ test_misc8(void)
/* Create a file acccess property list */
fapl = H5Pcreate(H5P_FILE_ACCESS);
- CHECK(fapl, FAIL, "H5Pcreate");
+ CHECK(fapl, FAIL, "H5Pcreate");
/* Get the default file access properties for caching */
ret=H5Pget_cache(fapl,&mdc_nelmts,&rdcc_nelmts,&rdcc_nbytes,&rdcc_w0);
@@ -1227,16 +1227,16 @@ test_misc8(void)
/* Create a dataset creation property list */
dcpl = H5Pcreate(H5P_DATASET_CREATE);
- CHECK(dcpl, FAIL, "H5Pcreate");
+ CHECK(dcpl, FAIL, "H5Pcreate");
/* I. contiguous dataset tests */
ret = H5Pset_layout(dcpl, H5D_CONTIGUOUS);
- CHECK(ret, FAIL, "H5Pset_layout");
+ CHECK(ret, FAIL, "H5Pset_layout");
/* Set the space allocation time to early */
ret = H5Pset_alloc_time(dcpl,H5D_ALLOC_TIME_EARLY);
- CHECK(ret, FAIL, "H5Pset_alloc_time");
+ CHECK(ret, FAIL, "H5Pset_alloc_time");
/* Create a contiguous dataset, with space allocation early */
did = H5Dcreate(fid, MISC8_DSETNAME1, H5T_NATIVE_INT, sid, dcpl);
@@ -1254,7 +1254,7 @@ test_misc8(void)
#ifndef H5_HAVE_PARALLEL
/* Set the space allocation time to late */
ret = H5Pset_alloc_time(dcpl,H5D_ALLOC_TIME_LATE);
- CHECK(ret, FAIL, "H5Pset_alloc_time");
+ CHECK(ret, FAIL, "H5Pset_alloc_time");
/* Create a contiguous dataset, with space allocation late */
did = H5Dcreate(fid, MISC8_DSETNAME2, H5T_NATIVE_INT, sid, dcpl);
@@ -1279,7 +1279,7 @@ test_misc8(void)
/* Set the space allocation time to incremental */
ret = H5Pset_alloc_time(dcpl,H5D_ALLOC_TIME_INCR);
- CHECK(ret, FAIL, "H5Pset_alloc_time");
+ CHECK(ret, FAIL, "H5Pset_alloc_time");
/* Create a contiguous dataset, with space allocation late */
did = H5Dcreate(fid, MISC8_DSETNAME3, H5T_NATIVE_INT, sid, dcpl);
@@ -1305,11 +1305,11 @@ test_misc8(void)
/* II. compact dataset tests */
ret = H5Pset_layout(dcpl, H5D_COMPACT);
- CHECK(ret, FAIL, "H5Pset_layout");
+ CHECK(ret, FAIL, "H5Pset_layout");
/* Set the space allocation time to late */
ret = H5Pset_alloc_time(dcpl,H5D_ALLOC_TIME_LATE);
- CHECK(ret, FAIL, "H5Pset_alloc_time");
+ CHECK(ret, FAIL, "H5Pset_alloc_time");
/* Create a contiguous dataset, with space allocation late */
/* Should fail */
@@ -1318,7 +1318,7 @@ test_misc8(void)
/* Set the space allocation time to incremental */
ret = H5Pset_alloc_time(dcpl,H5D_ALLOC_TIME_INCR);
- CHECK(ret, FAIL, "H5Pset_alloc_time");
+ CHECK(ret, FAIL, "H5Pset_alloc_time");
/* Create a contiguous dataset, with space allocation incremental */
/* Should fail */
@@ -1327,11 +1327,11 @@ test_misc8(void)
/* Set the space allocation time to early */
ret = H5Pset_alloc_time(dcpl,H5D_ALLOC_TIME_EARLY);
- CHECK(ret, FAIL, "H5Pset_alloc_time");
+ CHECK(ret, FAIL, "H5Pset_alloc_time");
/* Set the fill time to allocation */
ret = H5Pset_fill_time(dcpl,H5D_FILL_TIME_ALLOC);
- CHECK(ret, FAIL, "H5Pset_alloc_time");
+ CHECK(ret, FAIL, "H5Pset_alloc_time");
/* Create a contiguous dataset, with space allocation early */
did = H5Dcreate(fid, MISC8_DSETNAME4, H5T_NATIVE_INT, sid, dcpl);
@@ -1350,15 +1350,15 @@ test_misc8(void)
/* III. chunked dataset tests */
ret = H5Pset_layout(dcpl, H5D_CHUNKED);
- CHECK(ret, FAIL, "H5Pset_layout");
+ CHECK(ret, FAIL, "H5Pset_layout");
/* Set the space allocation time to early */
ret = H5Pset_alloc_time(dcpl,H5D_ALLOC_TIME_EARLY);
- CHECK(ret, FAIL, "H5Pset_alloc_time");
+ CHECK(ret, FAIL, "H5Pset_alloc_time");
/* Use chunked storage for this dataset */
ret = H5Pset_chunk(dcpl,rank,chunk_dims);
- CHECK(ret, FAIL, "H5Pset_chunk");
+ CHECK(ret, FAIL, "H5Pset_chunk");
/* Create a chunked dataset, with space allocation early */
did = H5Dcreate(fid, MISC8_DSETNAME5, H5T_NATIVE_INT, sid, dcpl);
@@ -1376,11 +1376,11 @@ test_misc8(void)
#ifndef H5_HAVE_PARALLEL
/* Set the space allocation time to late */
ret = H5Pset_alloc_time(dcpl,H5D_ALLOC_TIME_LATE);
- CHECK(ret, FAIL, "H5Pset_alloc_time");
+ CHECK(ret, FAIL, "H5Pset_alloc_time");
/* Use chunked storage for this dataset */
ret = H5Pset_chunk(dcpl,rank,chunk_dims);
- CHECK(ret, FAIL, "H5Pset_chunk");
+ CHECK(ret, FAIL, "H5Pset_chunk");
/* Create a chunked dataset, with space allocation late */
did = H5Dcreate(fid, MISC8_DSETNAME6, H5T_NATIVE_INT, sid, dcpl);
@@ -1405,7 +1405,7 @@ test_misc8(void)
/* Set the space allocation time to incremental */
ret = H5Pset_alloc_time(dcpl,H5D_ALLOC_TIME_INCR);
- CHECK(ret, FAIL, "H5Pset_alloc_time");
+ CHECK(ret, FAIL, "H5Pset_alloc_time");
/* Create a chunked dataset, with space allocation incremental */
did = H5Dcreate(fid, MISC8_DSETNAME7, H5T_NATIVE_INT, sid, dcpl);
@@ -1453,12 +1453,12 @@ test_misc8(void)
/* Set the space allocation time to early */
ret = H5Pset_alloc_time(dcpl,H5D_ALLOC_TIME_EARLY);
- CHECK(ret, FAIL, "H5Pset_alloc_time");
+ CHECK(ret, FAIL, "H5Pset_alloc_time");
/* Use compression as well as chunking for these datasets */
#ifdef H5_HAVE_FILTER_DEFLATE
ret = H5Pset_deflate(dcpl,9);
- CHECK(ret, FAIL, "H5Pset_deflate");
+ CHECK(ret, FAIL, "H5Pset_deflate");
#endif /* end H5_HAVE_FILTER_DEFLATE */
/* Create a chunked dataset, with space allocation early */
@@ -1487,7 +1487,7 @@ test_misc8(void)
#ifndef H5_HAVE_PARALLEL
/* Set the space allocation time to late */
ret = H5Pset_alloc_time(dcpl,H5D_ALLOC_TIME_LATE);
- CHECK(ret, FAIL, "H5Pset_alloc_time");
+ CHECK(ret, FAIL, "H5Pset_alloc_time");
/* Create a chunked dataset, with space allocation late */
did = H5Dcreate(fid, MISC8_DSETNAME9, H5T_NATIVE_INT, sid, dcpl);
@@ -1547,7 +1547,7 @@ test_misc8(void)
/* Set the space allocation time to incremental */
ret = H5Pset_alloc_time(dcpl,H5D_ALLOC_TIME_INCR);
- CHECK(ret, FAIL, "H5Pset_alloc_time");
+ CHECK(ret, FAIL, "H5Pset_alloc_time");
/* Create a chunked dataset, with space allocation incremental */
did = H5Dcreate(fid, MISC8_DSETNAME10, H5T_NATIVE_INT, sid, dcpl);
@@ -1673,7 +1673,7 @@ test_misc10(void)
hid_t space, type; /* Old dataset's dataspace & datatype */
char testfile[512]=""; /* Character buffer for corrected test file name */
char *srcdir = getenv("srcdir"); /* Pointer to the directory the source code is located within */
- herr_t ret;
+ herr_t ret;
/* Output message about test being performed */
MESSAGE(5, ("Testing using old dataset creation property list\n"));
@@ -1790,20 +1790,20 @@ test_misc11(void)
/* Create a file creation property list */
fcpl = H5Pcreate(H5P_FILE_CREATE);
- CHECK(fcpl, FAIL, "H5Pcreate");
+ CHECK(fcpl, FAIL, "H5Pcreate");
/* Set all the properties in the FCPL */
ret=H5Pset_userblock(fcpl,(hsize_t)MISC11_USERBLOCK);
- CHECK(ret, FAIL, "H5Pset_userblock");
+ CHECK(ret, FAIL, "H5Pset_userblock");
ret=H5Pset_sizes(fcpl,MISC11_SIZEOF_OFF,MISC11_SIZEOF_LEN);
- CHECK(ret, FAIL, "H5Pset_sizes");
+ CHECK(ret, FAIL, "H5Pset_sizes");
ret=H5Pset_sym_k(fcpl,MISC11_SYM_IK,MISC11_SYM_LK);
- CHECK(ret, FAIL, "H5Pset_sym_k");
+ CHECK(ret, FAIL, "H5Pset_sym_k");
ret=H5Pset_istore_k(fcpl,MISC11_ISTORE_IK);
- CHECK(ret, FAIL, "H5Pset_istore_k");
+ CHECK(ret, FAIL, "H5Pset_istore_k");
/* Creating a file with the non-default file creation property list should
* create a version 1 superblock
@@ -1855,22 +1855,22 @@ test_misc11(void)
/* Retrieve all the property values & check them */
ret=H5Pget_userblock(fcpl,&userblock);
- CHECK(ret, FAIL, "H5Pget_userblock");
- VERIFY(userblock, MISC11_USERBLOCK, "H5Pget_userblock");
+ CHECK(ret, FAIL, "H5Pget_userblock");
+ VERIFY(userblock, MISC11_USERBLOCK, "H5Pget_userblock");
ret=H5Pget_sizes(fcpl,&off_size,&len_size);
- CHECK(ret, FAIL, "H5Pget_sizes");
- VERIFY(off_size, MISC11_SIZEOF_OFF, "H5Pget_sizes");
- VERIFY(len_size, MISC11_SIZEOF_LEN, "H5Pget_sizes");
+ CHECK(ret, FAIL, "H5Pget_sizes");
+ VERIFY(off_size, MISC11_SIZEOF_OFF, "H5Pget_sizes");
+ VERIFY(len_size, MISC11_SIZEOF_LEN, "H5Pget_sizes");
ret=H5Pget_sym_k(fcpl,&sym_ik,&sym_lk);
- CHECK(ret, FAIL, "H5Pget_sym_k");
- VERIFY(sym_ik, MISC11_SYM_IK, "H5Pget_sym_k");
- VERIFY(sym_lk, MISC11_SYM_LK, "H5Pget_sym_k");
+ CHECK(ret, FAIL, "H5Pget_sym_k");
+ VERIFY(sym_ik, MISC11_SYM_IK, "H5Pget_sym_k");
+ VERIFY(sym_lk, MISC11_SYM_LK, "H5Pget_sym_k");
ret=H5Pget_istore_k(fcpl,&istore_ik);
- CHECK(ret, FAIL, "H5Pget_istore_k");
- VERIFY(istore_ik, MISC11_ISTORE_IK, "H5Pget_istore_k");
+ CHECK(ret, FAIL, "H5Pget_istore_k");
+ VERIFY(istore_ik, MISC11_ISTORE_IK, "H5Pget_istore_k");
/* Close file */
ret=H5Fclose(file);
@@ -1895,19 +1895,19 @@ test_misc12(void)
"conceived in liberty and dedicated to the proposition that all men are created equal.",
"Now we are engaged in a great civil war,",
"testing whether that nation or any nation so conceived and so dedicated can long endure."
- };
+ };
const char *wdata1 [MISC12_APPEND_SIZE]= {
"O Gloria inmarcesible! O Jubilo inmortal! En surcos de dolores, el",
"bien germina ya! Ceso la horrible noche, La libertad sublime",
"derrama las auroras de su invencible luz.",
- "La humanidad entera, que entre cadenas gime, comprende",
+ "La humanidad entera, que entre cadenas gime, comprende",
"las palabras del que murio en la cruz."
};
char *rdata [MISC12_SPACE1_DIM1+MISC12_APPEND_SIZE]; /* Information read in */
- hid_t fid1;
- hid_t dataset;
+ hid_t fid1;
+ hid_t dataset;
hid_t sid1, space, memspace;
- hid_t tid1, cparms;
+ hid_t tid1, cparms;
hsize_t dims1[] = {MISC12_SPACE1_DIM1};
hsize_t dimsn[] = {MISC12_APPEND_SIZE};
hsize_t maxdims1[1] = {H5S_UNLIMITED};
@@ -1953,7 +1953,7 @@ test_misc12(void)
/* Write dataset to disk */
ret = H5Dwrite (dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
CHECK(ret, FAIL, "H5Dwrite");
-
+
/* Extend dataset */
ret = H5Dextend (dataset, newsize);
CHECK(ret, FAIL, "H5Dextend");
@@ -2625,8 +2625,8 @@ test_misc15(void)
/****************************************************************
**
-** test_misc16(): Test array of NULL-terminated
-** fixed-length string. It creates a dataset of fixed-length
+** test_misc16(): Test array of NULL-terminated
+** fixed-length string. It creates a dataset of fixed-length
** strings. Each string is MISC16_STR_SIZE long. There are
** totally MISC16_SPACE_DIM by MISC16_SPACE_RANK strings.
**
@@ -2636,7 +2636,7 @@ test_misc16(void)
{
hid_t file; /* File ID */
herr_t ret; /* Generic return value */
- const char wdata[MISC16_SPACE_DIM][MISC16_STR_SIZE] =
+ const char wdata[MISC16_SPACE_DIM][MISC16_STR_SIZE] =
{"1234567", "1234567\0", "12345678", {NULL}};
char rdata[MISC16_SPACE_DIM][MISC16_STR_SIZE]; /* Information read in */
hid_t dataset; /* Dataset ID */
@@ -2659,7 +2659,7 @@ test_misc16(void)
ret = H5Tset_size (tid,MISC16_STR_SIZE);
CHECK(ret, FAIL, "H5Tset_size");
-
+
/*ret = H5Tset_strpad (tid,H5T_STR_NULLPAD);
CHECK(ret, FAIL, "H5Tset_strpad");*/
@@ -2705,8 +2705,8 @@ test_misc16(void)
/****************************************************************
**
-** test_misc17(): Test array of characters. It creates a dataset
-** of ASCII characters, with dimensionality of MISC17_SPACE_DIM1
+** test_misc17(): Test array of characters. It creates a dataset
+** of ASCII characters, with dimensionality of MISC17_SPACE_DIM1
** by MISC17_SPACE_DIM2.
**
****************************************************************/
@@ -2715,7 +2715,7 @@ test_misc17(void)
{
hid_t file; /* File ID */
herr_t ret; /* Generic return value */
- const char wdata[MISC17_SPACE_DIM1][MISC17_SPACE_DIM2] =
+ const char wdata[MISC17_SPACE_DIM1][MISC17_SPACE_DIM2] =
{"1234567", "1234567\0", "12345678", {NULL}};
char rdata[MISC17_SPACE_DIM1][MISC17_SPACE_DIM2]; /* Information read in */
hid_t dataset; /* Dataset ID */
@@ -3346,11 +3346,11 @@ test_misc20(void)
/* Create a dataset creation property list */
dcpl = H5Pcreate(H5P_DATASET_CREATE);
- CHECK(dcpl, FAIL, "H5Pcreate");
+ CHECK(dcpl, FAIL, "H5Pcreate");
/* Use chunked storage for this dataset */
ret = H5Pset_chunk(dcpl,rank,big_dims);
- VERIFY(ret, FAIL, "H5Pset_chunk");
+ VERIFY(ret, FAIL, "H5Pset_chunk");
/* Verify that the storage for the dataset is the correct size and hasn't
* been truncated.
@@ -3366,7 +3366,7 @@ test_misc20(void)
/* Make certain that the dataset's storage doesn't get allocated :-) */
ret = H5Pset_alloc_time(dcpl,H5D_ALLOC_TIME_LATE);
- CHECK(ret, FAIL, "H5Pset_alloc_time");
+ CHECK(ret, FAIL, "H5Pset_alloc_time");
/* Create dataset with big dataspace */
did = H5Dcreate(fid, MISC20_DSET_NAME, H5T_NATIVE_INT, sid, dcpl);
@@ -3487,12 +3487,12 @@ test_misc20(void)
} /* end test_misc20() */
-/*
- test_misc21 and test_misc22 should be executed when SZIP is present
+/*
+ test_misc21 and test_misc22 should be executed when SZIP is present
and encoder is available.
EIP 2004/8/04
-*/
-#if defined H5_HAVE_FILTER_SZIP
+*/
+#if defined H5_HAVE_FILTER_SZIP
/****************************************************************
**
@@ -3530,9 +3530,9 @@ test_misc21(void)
/* Set custom DCPL properties */
ret = H5Pset_chunk (dcpl, MISC21_SPACE_RANK, chunk_size);
CHECK(ret, FAIL, "H5Pset_chunk");
- ret = H5Pset_szip (dcpl, H5_SZIP_NN_OPTION_MASK, 8);
+ ret = H5Pset_szip (dcpl, H5_SZIP_NN_OPTION_MASK, 8);
CHECK(ret, FAIL, "H5Pset_deflate");
- ret = H5Pset_alloc_time (dcpl, H5D_ALLOC_TIME_LATE);
+ ret = H5Pset_alloc_time (dcpl, H5D_ALLOC_TIME_LATE);
CHECK(ret, FAIL, "H5Pset_alloc_time");
/* Create the dataspace for the dataset */
@@ -3559,11 +3559,11 @@ test_misc21(void)
HDfree(buf);
} /* end test_misc21() */
-
+
/****************************************************************
**
** test_misc22(): Test SZIP bits-per-pixel paramter.
-** This should be set according to the datatype.
+** This should be set according to the datatype.
** Tests for precision and offset combo's.
**
****************************************************************/
@@ -3579,8 +3579,8 @@ test_misc22(void)
/* should extend test to signed ints */
hid_t idts[4];
/* do the same for floats
- hid_t fdts[2]={H5T_NATIVE_FLOAT32,
- H5T_NATIVE_FLOAT64}
+ hid_t fdts[2]={H5T_NATIVE_FLOAT32,
+ H5T_NATIVE_FLOAT64}
*/
int prec[4] = {3,11,19,27};
int offsets[5] = {0,3,11,19,27};
@@ -3623,14 +3623,14 @@ test_misc22(void)
/* Create the DCPL */
dcpl = H5Pcreate (H5P_DATASET_CREATE);
CHECK(dcpl, FAIL, "H5Pcreate");
-
+
/* Set DCPL properties */
ret = H5Pset_chunk (dcpl, MISC22_SPACE_RANK, chunk_size);
CHECK(ret, FAIL, "H5Pset_chunk");
/* Set custom DCPL properties */
ret = H5Pset_szip (dcpl, H5_SZIP_NN_OPTION_MASK, 32); /* vary the PPB */
CHECK(ret, FAIL, "H5Pset_szip");
-
+
/* set up the datatype according to the loop */
dtype = H5Tcopy(idts[i]);
CHECK(dtype, FAIL, "H5Tcopy");
@@ -3641,7 +3641,7 @@ test_misc22(void)
/* compute the correct PPB that should be set by SZIP */
if (offsets[k] == 0) {
- correct=prec[j];
+ correct=prec[j];
} else {
correct=H5Tget_size(idts[i])*8;
}
@@ -3649,15 +3649,15 @@ test_misc22(void)
if (correct <= 32) correct=32;
else if (correct <= 64) correct=64;
}
-
+
/* Create the dataset */
dsid = H5Dcreate (fid, MISC22_DSET_NAME, dtype, sid, dcpl);
CHECK(dsid, FAIL, "H5Dwrite");
-
+
/* Write out the whole dataset */
ret = H5Dwrite (dsid, dtype, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
CHECK(ret, FAIL, "H5Dwrite");
-
+
/* Close everything */
ret = H5Dclose (dsid);
CHECK(ret, FAIL, "H5Dclose");
@@ -3665,25 +3665,25 @@ test_misc22(void)
CHECK(ret, FAIL, "H5Tclose");
ret = H5Pclose (dcpl);
CHECK(ret, FAIL, "H5Pclose");
-
+
dsid = H5Dopen (fid, MISC22_DSET_NAME);
CHECK(dsid, FAIL, "H5Topen");
-
+
dcpl2 = H5Dget_create_plist(dsid);
CHECK(dcpl2, FAIL, "H5Dget_create_plist");
-
- ret= H5Pget_filter_by_id( dcpl2, H5Z_FILTER_SZIP, &flags,
+
+ ret= H5Pget_filter_by_id( dcpl2, H5Z_FILTER_SZIP, &flags,
&cd_nelmts, cd_values, 0, NULL , NULL );
CHECK(ret, FAIL, "H5Pget_filter_by_id");
-
+
VERIFY(cd_values[2], correct, "SZIP filter returned value for precision");
-
+
ret = H5Dclose (dsid);
CHECK(ret, FAIL, "H5Dclose");
ret = H5Gunlink (fid, MISC22_DSET_NAME );
CHECK(ret, FAIL, "H5Dunlink");
-
+
ret = H5Pclose (dcpl2);
CHECK(ret, FAIL, "H5Pclose");
}
@@ -3739,7 +3739,7 @@ test_misc23(void)
/**********************************************************************
- * test the old APIs
+ * test the old APIs
**********************************************************************/
H5E_BEGIN_TRY {
@@ -3768,7 +3768,7 @@ test_misc23(void)
CHECK(status, FAIL, "H5Dclose");
/**********************************************************************
- * test H5Gcreate_expand()
+ * test H5Gcreate_expand()
**********************************************************************/
/* Create group creation property list */
@@ -3820,7 +3820,7 @@ test_misc23(void)
/**********************************************************************
- * test new H5Dcreate
+ * test new H5Dcreate
**********************************************************************/
/* Create dataset creation property list */
@@ -3872,7 +3872,7 @@ test_misc23(void)
/**********************************************************************
- * test new H5Tcommit
+ * test new H5Tcommit
**********************************************************************/
/* Create datatype creation property list */
@@ -3942,9 +3942,9 @@ test_misc23(void)
/****************************************************************
**
** test_misc(): Main misc. test routine.
-**
+**
****************************************************************/
-void
+void
test_misc(void)
{
/* Output message about test being performed */
@@ -3970,7 +3970,7 @@ test_misc(void)
test_misc18(); /* Test new object header information in H5G_stat_t struct */
test_misc19(); /* Test incrementing & decrementing ref count on IDs */
test_misc20(); /* Test problems with truncated dimensions in version 2 of storage layout message */
-#if defined H5_HAVE_FILTER_SZIP
+#if defined H5_HAVE_FILTER_SZIP
test_misc21(); /* Test that "late" allocation time is treated the same as "incremental", for chunked datasets w/a filters */
test_misc22(); /* check szip bits per pixel */
#endif /* H5_HAVE_FILTER_SZIP */
@@ -4019,7 +4019,7 @@ cleanup_misc(void)
HDremove(MISC18_FILE);
HDremove(MISC19_FILE);
HDremove(MISC20_FILE);
-#if defined H5_HAVE_FILTER_SZIP
+#if defined H5_HAVE_FILTER_SZIP
HDremove(MISC21_FILE);
HDremove(MISC22_FILE);
#endif /* H5_HAVE_FILTER_SZIP */
diff --git a/test/trefer.c b/test/trefer.c
index 491dc36..66b7822 100644
--- a/test/trefer.c
+++ b/test/trefer.c
@@ -65,9 +65,9 @@ typedef struct s1_t {
**
** test_reference_obj(): Test basic H5R (reference) object reference code.
** Tests references to various kinds of objects
-**
+**
****************************************************************/
-static void
+static void
test_reference_obj(void)
{
hid_t fid1; /* HDF5 File IDs */
@@ -194,7 +194,7 @@ test_reference_obj(void)
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close Dataset */
ret = H5Dclose(dataset);
CHECK(ret, FAIL, "H5Dclose");
@@ -222,7 +222,7 @@ test_reference_obj(void)
/* Check information in referenced dataset */
sid1 = H5Dget_space(dset2);
CHECK(sid1, FAIL, "H5Dget_space");
-
+
ret=(int)H5Sget_simple_extent_npoints(sid1);
VERIFY(ret, 4, "H5Sget_simple_extent_npoints");
@@ -290,9 +290,9 @@ test_reference_obj(void)
**
** test_reference_region(): Test basic H5R (reference) object reference code.
** Tests references to various kinds of objects
-**
+**
****************************************************************/
-static void
+static void
test_reference_region(void)
{
hid_t fid1; /* HDF5 File IDs */
@@ -405,7 +405,7 @@ test_reference_region(void)
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close Dataset */
ret = H5Dclose(dset1);
CHECK(ret, FAIL, "H5Dclose");
@@ -413,7 +413,7 @@ test_reference_region(void)
/* Close uint8 dataset dataspace */
ret = H5Sclose(sid2);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close file */
ret = H5Fclose(fid1);
CHECK(ret, FAIL, "H5Fclose");
@@ -551,9 +551,9 @@ test_reference_region(void)
**
** test_reference_region_1D(): Test H5R (reference) object reference code.
** Tests 1-D references to various kinds of objects
-**
+**
****************************************************************/
-static void
+static void
test_reference_region_1D(void)
{
hid_t fid1; /* HDF5 File IDs */
@@ -666,7 +666,7 @@ test_reference_region_1D(void)
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close Dataset */
ret = H5Dclose(dset1);
CHECK(ret, FAIL, "H5Dclose");
@@ -674,7 +674,7 @@ test_reference_region_1D(void)
/* Close uint8 dataset dataspace */
ret = H5Sclose(sid3);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close file */
ret = H5Fclose(fid1);
CHECK(ret, FAIL, "H5Fclose");
@@ -824,9 +824,9 @@ test_reference_region_1D(void)
**
** test_reference_obj_deleted(): Test H5R (reference) object reference code.
** Tests for correct failures for deleted and non-existent objects
-**
+**
****************************************************************/
-static void
+static void
test_reference_obj_deleted(void)
{
hid_t fid1; /* HDF5 File IDs */
@@ -877,7 +877,7 @@ test_reference_obj_deleted(void)
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close file */
ret = H5Fclose(fid1);
CHECK(ret, FAIL, "H5Fclose");
@@ -918,9 +918,9 @@ test_reference_obj_deleted(void)
**
** test_deref_iter_op(): Iterator callback for test_reference_group_iterate()
** test.
-**
+**
****************************************************************/
-static herr_t
+static herr_t
test_deref_iter_op(hid_t UNUSED group, const char *name, void *op_data)
{
int *count = (int *)op_data; /* Pointer to name counter */
@@ -951,9 +951,9 @@ test_deref_iter_op(hid_t UNUSED group, const char *name, void *op_data)
**
** test_reference_group(): Test H5R (reference) object reference code.
** Tests for correct behavior of various routines on dereferenced group
-**
+**
****************************************************************/
-static void
+static void
test_reference_group(void)
{
hid_t fid = -1; /* File ID */
@@ -967,7 +967,7 @@ test_reference_group(void)
H5G_obj_t objtype; /* Object type */
int count = 0; /* Count within iterated group */
herr_t ret;
-
+
/* Create file with a group and a dataset containing an object reference to the group */
fid = H5Fcreate(FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
CHECK(fid, FAIL, "H5Fcreate");
@@ -1065,9 +1065,9 @@ test_reference_group(void)
/****************************************************************
**
** test_reference(): Main H5R reference testing routine.
-**
+**
****************************************************************/
-void
+void
test_reference(void)
{
/* Output message about test being performed */
diff --git a/test/trefstr.c b/test/trefstr.c
index a278ebc..8073c3f 100644
--- a/test/trefstr.c
+++ b/test/trefstr.c
@@ -43,9 +43,9 @@ H5FL_BLK_EXTERN(str_buf);
**
** test_refstr_init(): Test basic H5RS (ref-counted strings) code.
** Initialize data for RS testing
-**
+**
****************************************************************/
-static void
+static void
test_refstr_init(void)
{
} /* end test_refstr_init() */
@@ -54,9 +54,9 @@ test_refstr_init(void)
**
** test_refstr_create(): Test basic H5RS (ref-counted strings) code.
** Tests creating and closing ref-counted strings.
-**
+**
****************************************************************/
-static void
+static void
test_refstr_create(void)
{
H5RS_str_t *rs; /* Ref-counted string created */
@@ -84,9 +84,9 @@ test_refstr_create(void)
**
** test_refstr_count(): Test basic H5RS (ref-counted strings) code.
** Tests reference counting on ref-counted strings.
-**
+**
****************************************************************/
-static void
+static void
test_refstr_count(void)
{
H5RS_str_t *rs; /* Ref-counted string created */
@@ -130,9 +130,9 @@ test_refstr_count(void)
**
** test_refstr_dup(): Test basic H5RS (ref-counted strings) code.
** Tests duplicating ref-counted strings.
-**
+**
****************************************************************/
-static void
+static void
test_refstr_dup(void)
{
H5RS_str_t *rs1; /* Ref-counted string created */
@@ -179,9 +179,9 @@ test_refstr_dup(void)
**
** test_refstr_cmp(): Test basic H5RS (ref-counted strings) code.
** Tests comparing ref-counted strings.
-**
+**
****************************************************************/
-static void
+static void
test_refstr_cmp(void)
{
H5RS_str_t *rs1; /* Ref-counted string created */
@@ -228,9 +228,9 @@ test_refstr_cmp(void)
**
** test_refstr_wrap(): Test basic H5RS (ref-counted strings) code.
** Tests wrapping ref-counted strings around existing strings.
-**
+**
****************************************************************/
-static void
+static void
test_refstr_wrap(void)
{
H5RS_str_t *rs; /* Ref-counted string created */
@@ -284,9 +284,9 @@ test_refstr_wrap(void)
** test_refstr_own(): Test basic H5RS (ref-counted strings) code.
** Tests transferring ownership of dynamically allocated strings
** to ref-counted strings.
-**
+**
****************************************************************/
-static void
+static void
test_refstr_own(void)
{
H5RS_str_t *rs; /* Ref-counted string created */
@@ -339,9 +339,9 @@ test_refstr_own(void)
**
** test_refstr_finalize(): Test basic H5RS (ref-counted strings) code.
** Wrap up data for ref-counted string testing
-**
+**
****************************************************************/
-static void
+static void
test_refstr_finalize(void)
{
} /* end test_refstr_finalize() */
@@ -349,7 +349,7 @@ test_refstr_finalize(void)
/****************************************************************
**
** test_refstr(): Main H5RS testing routine.
-**
+**
****************************************************************/
void
test_refstr(void)
diff --git a/test/tselect.c b/test/tselect.c
index 92e765c..804e928 100644
--- a/test/tselect.c
+++ b/test/tselect.c
@@ -107,21 +107,21 @@
#define POINT1_NPOINTS 10
/* Chunked dataset information */
-#define DATASETNAME "ChunkArray"
-#define NX_SUB 87 /* hyperslab dimensions */
-#define NY_SUB 61
-#define NZ_SUB 181
-#define NX 87 /* output buffer dimensions */
-#define NY 61
-#define NZ 181
+#define DATASETNAME "ChunkArray"
+#define NX_SUB 87 /* hyperslab dimensions */
+#define NY_SUB 61
+#define NZ_SUB 181
+#define NX 87 /* output buffer dimensions */
+#define NY 61
+#define NZ 181
#define RANK_F 3 /* File dataspace rank */
#define RANK_M 3 /* Memory dataspace rank */
#define X 87 /* dataset dimensions */
-#define Y 61
-#define Z 181
+#define Y 61
+#define Z 181
#define CHUNK_X 87 /* chunk dimensions */
-#define CHUNK_Y 61
-#define CHUNK_Z 181
+#define CHUNK_Y 61
+#define CHUNK_Z 181
/* Basic chunk size */
#define SPACE10_DIM1 180
@@ -151,9 +151,9 @@ herr_t test_select_hyper_iter3(void *elem,hid_t type_id, unsigned ndim, const hs
/****************************************************************
**
** test_select_hyper_iter1(): Iterator for checking hyperslab iteration
-**
+**
****************************************************************/
-herr_t
+herr_t
test_select_hyper_iter1(void *_elem, hid_t UNUSED type_id, unsigned UNUSED ndim, const hsize_t UNUSED *point, void *_operator_data)
{
uint8_t *tbuf=(uint8_t *)_elem, /* temporary buffer pointer */
@@ -171,9 +171,9 @@ test_select_hyper_iter1(void *_elem, hid_t UNUSED type_id, unsigned UNUSED ndim,
**
** test_select_hyper(): Test basic H5S (dataspace) selection code.
** Tests hyperslabs of various sizes and dimensionalities.
-**
+**
****************************************************************/
-static void
+static void
test_select_hyper(hid_t xfer_plist)
{
hid_t fid1; /* HDF5 File IDs */
@@ -312,11 +312,11 @@ test_select_hyper(hid_t xfer_plist)
/* Close memory dataspace */
ret = H5Sclose(sid2);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close Dataset */
ret = H5Dclose(dataset);
CHECK(ret, FAIL, "H5Dclose");
@@ -340,15 +340,15 @@ struct pnt_iter {
**
** test_select_point_iter1(): Iterator for checking point iteration
** (This is really ugly code, not a very good example of correct usage - QAK)
-**
+**
****************************************************************/
-herr_t
+herr_t
test_select_point_iter1(void *_elem, hid_t UNUSED type_id, unsigned UNUSED ndim, const hsize_t UNUSED *point, void *_operator_data)
{
uint8_t *elem=(uint8_t *)_elem; /* Pointer to the element to examine */
uint8_t *tmp; /* temporary ptr to element in operator data */
struct pnt_iter *pnt_info=(struct pnt_iter *)_operator_data;
-
+
tmp=pnt_info->buf+(pnt_info->coord[pnt_info->offset][0]*SPACE2_DIM2)+pnt_info->coord[pnt_info->offset][1];
if(*elem!=*tmp)
return(-1);
@@ -363,9 +363,9 @@ test_select_point_iter1(void *_elem, hid_t UNUSED type_id, unsigned UNUSED ndim,
** test_select_point(): Test basic H5S (dataspace) selection code.
** Tests element selections between dataspaces of various sizes
** and dimensionalities.
-**
+**
****************************************************************/
-static void
+static void
test_select_point(hid_t xfer_plist)
{
hid_t fid1; /* HDF5 File IDs */
@@ -592,11 +592,11 @@ test_select_point(hid_t xfer_plist)
/* Close memory dataspace */
ret = H5Sclose(sid2);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close Dataset */
ret = H5Dclose(dataset);
CHECK(ret, FAIL, "H5Dclose");
@@ -613,10 +613,10 @@ test_select_point(hid_t xfer_plist)
/****************************************************************
**
** test_select_all_iter1(): Iterator for checking all iteration
-**
-**
+**
+**
****************************************************************/
-herr_t
+herr_t
test_select_all_iter1(void *_elem, hid_t UNUSED type_id, unsigned UNUSED ndim, const hsize_t UNUSED *point, void *_operator_data)
{
uint8_t *tbuf=(uint8_t *)_elem, /* temporary buffer pointer */
@@ -634,9 +634,9 @@ test_select_all_iter1(void *_elem, hid_t UNUSED type_id, unsigned UNUSED ndim, c
**
** test_select_none_iter1(): Iterator for checking none iteration
** (This is never supposed to be called, so it always returns -1)
-**
+**
****************************************************************/
-herr_t
+herr_t
test_select_none_iter1(void UNUSED *_elem, hid_t UNUSED type_id, unsigned UNUSED ndim, const hsize_t UNUSED *point, void UNUSED *_operator_data)
{
return(-1);
@@ -646,9 +646,9 @@ test_select_none_iter1(void UNUSED *_elem, hid_t UNUSED type_id, unsigned UNUSED
**
** test_select_all(): Test basic H5S (dataspace) selection code.
** Tests "all" selections.
-**
+**
****************************************************************/
-static void
+static void
test_select_all(hid_t xfer_plist)
{
hid_t fid1; /* HDF5 File IDs */
@@ -706,7 +706,7 @@ test_select_all(hid_t xfer_plist)
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close Dataset */
ret = H5Dclose(dataset);
CHECK(ret, FAIL, "H5Dclose");
@@ -724,9 +724,9 @@ test_select_all(hid_t xfer_plist)
**
** test_select_all_hyper(): Test basic H5S (dataspace) selection code.
** Tests "all" and hyperslab selections.
-**
+**
****************************************************************/
-static void
+static void
test_select_all_hyper(hid_t xfer_plist)
{
hid_t fid1; /* HDF5 File IDs */
@@ -839,11 +839,11 @@ test_select_all_hyper(hid_t xfer_plist)
/* Close memory dataspace */
ret = H5Sclose(sid2);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close Dataset */
ret = H5Dclose(dataset);
CHECK(ret, FAIL, "H5Dclose");
@@ -862,9 +862,9 @@ test_select_all_hyper(hid_t xfer_plist)
** test_select_combo(): Test basic H5S (dataspace) selection code.
** Tests combinations of element and hyperslab selections between
** dataspaces of various sizes and dimensionalities.
-**
+**
****************************************************************/
-static void
+static void
test_select_combo(void)
{
hid_t fid1; /* HDF5 File IDs */
@@ -969,11 +969,11 @@ test_select_combo(void)
/* Close memory dataspace */
ret = H5Sclose(sid2);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close Dataset */
ret = H5Dclose(dataset);
CHECK(ret, FAIL, "H5Dclose");
@@ -987,7 +987,7 @@ test_select_combo(void)
HDfree(rbuf);
} /* test_select_combo() */
-int
+int
compare_size_t(const void *s1, const void *s2)
{
if(*(const size_t *)s1<*(const size_t *)s2)
@@ -1003,9 +1003,9 @@ compare_size_t(const void *s1, const void *s2)
**
** test_select_hyper_stride(): Test H5S (dataspace) selection code.
** Tests strided hyperslabs of various sizes and dimensionalities.
-**
+**
****************************************************************/
-static void
+static void
test_select_hyper_stride(hid_t xfer_plist)
{
hid_t fid1; /* HDF5 File IDs */
@@ -1133,11 +1133,11 @@ test_select_hyper_stride(hid_t xfer_plist)
/* Close memory dataspace */
ret = H5Sclose(sid2);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close Dataset */
ret = H5Dclose(dataset);
CHECK(ret, FAIL, "H5Dclose");
@@ -1155,9 +1155,9 @@ test_select_hyper_stride(hid_t xfer_plist)
**
** test_select_hyper_contig(): Test H5S (dataspace) selection code.
** Tests contiguous hyperslabs of various sizes and dimensionalities.
-**
+**
****************************************************************/
-static void
+static void
test_select_hyper_contig(hid_t dset_type, hid_t xfer_plist)
{
hid_t fid1; /* HDF5 File IDs */
@@ -1262,11 +1262,11 @@ test_select_hyper_contig(hid_t dset_type, hid_t xfer_plist)
/* Close memory dataspace */
ret = H5Sclose(sid2);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close Dataset */
ret = H5Dclose(dataset);
CHECK(ret, FAIL, "H5Dclose");
@@ -1284,9 +1284,9 @@ test_select_hyper_contig(hid_t dset_type, hid_t xfer_plist)
**
** test_select_hyper_contig2(): Test H5S (dataspace) selection code.
** Tests more contiguous hyperslabs of various sizes and dimensionalities.
-**
+**
****************************************************************/
-static void
+static void
test_select_hyper_contig2(hid_t dset_type, hid_t xfer_plist)
{
hid_t fid1; /* HDF5 File IDs */
@@ -1383,11 +1383,11 @@ test_select_hyper_contig2(hid_t dset_type, hid_t xfer_plist)
/* Close memory dataspace */
ret = H5Sclose(sid2);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close Dataset */
ret = H5Dclose(dataset);
CHECK(ret, FAIL, "H5Dclose");
@@ -1408,9 +1408,9 @@ test_select_hyper_contig2(hid_t dset_type, hid_t xfer_plist)
** This test uses a hyperslab that is contiguous in the lowest dimension,
** not contiguous in a dimension, then has a selection across the entire next
** dimension (which should be "flattened" out also).
-**
+**
****************************************************************/
-static void
+static void
test_select_hyper_contig3(hid_t dset_type, hid_t xfer_plist)
{
hid_t fid1; /* HDF5 File IDs */
@@ -1518,11 +1518,11 @@ test_select_hyper_contig3(hid_t dset_type, hid_t xfer_plist)
/* Close memory dataspace */
ret = H5Sclose(sid2);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close Dataset */
ret = H5Dclose(dataset);
CHECK(ret, FAIL, "H5Dclose");
@@ -1540,9 +1540,9 @@ test_select_hyper_contig3(hid_t dset_type, hid_t xfer_plist)
**
** test_select_hyper_copy(): Test H5S (dataspace) selection code.
** Tests copying hyperslab selections
-**
+**
****************************************************************/
-static void
+static void
test_select_hyper_copy(void)
{
hid_t fid1; /* HDF5 File IDs */
@@ -1667,15 +1667,15 @@ test_select_hyper_copy(void)
/* Close memory dataspace */
ret = H5Sclose(sid2);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close 2nd memory dataspace */
ret = H5Sclose(sid3);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close Dataset */
ret = H5Dclose(data1);
CHECK(ret, FAIL, "H5Dclose");
@@ -1698,9 +1698,9 @@ test_select_hyper_copy(void)
**
** test_select_point_copy(): Test H5S (dataspace) selection code.
** Tests copying point selections
-**
+**
****************************************************************/
-static void
+static void
test_select_point_copy(void)
{
hid_t fid1; /* HDF5 File IDs */
@@ -1835,15 +1835,15 @@ test_select_point_copy(void)
/* Close memory dataspace */
ret = H5Sclose(sid2);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close 2nd memory dataspace */
ret = H5Sclose(sid3);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close Dataset */
ret = H5Dclose(data1);
CHECK(ret, FAIL, "H5Dclose");
@@ -1867,9 +1867,9 @@ test_select_point_copy(void)
** test_select_hyper_offset(): Test basic H5S (dataspace) selection code.
** Tests hyperslabs of various sizes and dimensionalities with selection
** offsets.
-**
+**
****************************************************************/
-static void
+static void
test_select_hyper_offset(void)
{
hid_t fid1; /* HDF5 File IDs */
@@ -2004,11 +2004,11 @@ test_select_hyper_offset(void)
/* Close memory dataspace */
ret = H5Sclose(sid2);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close Dataset */
ret = H5Dclose(dataset);
CHECK(ret, FAIL, "H5Dclose");
@@ -2026,9 +2026,9 @@ test_select_hyper_offset(void)
**
** test_select_hyper_offset2(): Test basic H5S (dataspace) selection code.
** Tests optimized hyperslab I/O with selection offsets.
-**
+**
****************************************************************/
-static void
+static void
test_select_hyper_offset2(void)
{
hid_t fid1; /* HDF5 File IDs */
@@ -2121,11 +2121,11 @@ test_select_hyper_offset2(void)
/* Close memory dataspace */
ret = H5Sclose(sid2);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close Dataset */
ret = H5Dclose(dataset);
CHECK(ret, FAIL, "H5Dclose");
@@ -2144,9 +2144,9 @@ test_select_hyper_offset2(void)
** test_select_point_offset(): Test basic H5S (dataspace) selection code.
** Tests element selections between dataspaces of various sizes
** and dimensionalities with selection offsets.
-**
+**
****************************************************************/
-static void
+static void
test_select_point_offset(void)
{
hid_t fid1; /* HDF5 File IDs */
@@ -2291,11 +2291,11 @@ test_select_point_offset(void)
/* Close memory dataspace */
ret = H5Sclose(sid2);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close Dataset */
ret = H5Dclose(dataset);
CHECK(ret, FAIL, "H5Dclose");
@@ -2313,9 +2313,9 @@ test_select_point_offset(void)
**
** test_select_hyper_union(): Test basic H5S (dataspace) selection code.
** Tests unions of hyperslabs of various sizes and dimensionalities.
-**
+**
****************************************************************/
-static void
+static void
test_select_hyper_union(void)
{
hid_t fid1; /* HDF5 File IDs */
@@ -2439,11 +2439,11 @@ test_select_hyper_union(void)
/* Close memory dataspace */
ret = H5Sclose(sid2);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close Dataset */
ret = H5Dclose(dataset);
CHECK(ret, FAIL, "H5Dclose");
@@ -2532,11 +2532,11 @@ test_select_hyper_union(void)
/* Close memory dataspace */
ret = H5Sclose(sid2);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close Dataset */
ret = H5Dclose(dataset);
CHECK(ret, FAIL, "H5Dclose");
@@ -2621,11 +2621,11 @@ test_select_hyper_union(void)
/* Close memory dataspace */
ret = H5Sclose(sid2);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close Dataset */
ret = H5Dclose(dataset);
CHECK(ret, FAIL, "H5Dclose");
@@ -2718,11 +2718,11 @@ test_select_hyper_union(void)
/* Close memory dataspace */
ret = H5Sclose(sid2);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close Dataset */
ret = H5Dclose(dataset);
CHECK(ret, FAIL, "H5Dclose");
@@ -2802,11 +2802,11 @@ test_select_hyper_union(void)
/* Close memory dataspace */
ret = H5Sclose(sid2);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close Dataset */
ret = H5Dclose(dataset);
CHECK(ret, FAIL, "H5Dclose");
@@ -2826,9 +2826,9 @@ test_select_hyper_union(void)
** test_select_hyper_union_stagger(): Test basic H5S (dataspace) selection code.
** Tests unions of staggered hyperslabs. (Uses H5Scombine_hyperslab
** and H5Sselect_select instead of H5Sselect_hyperslab)
-**
+**
****************************************************************/
-static void
+static void
test_select_hyper_union_stagger(void)
{
hid_t file_id; /* File ID */
@@ -2939,7 +2939,7 @@ test_select_hyper_union_stagger(void)
/* Select hyperslab in memory */
error=H5Sselect_hyperslab(memspace,H5S_SELECT_SET,offset_out,stride,count_out,block);
CHECK(error, FAIL, "H5Sselect_hyperslab");
-
+
/* Read File Dataset */
error=H5Dread(dset_id,H5T_NATIVE_INT,memspace,tmp_space,H5P_DEFAULT,data_out);
CHECK(error, FAIL, "H5Dread");
@@ -2975,9 +2975,9 @@ test_select_hyper_union_stagger(void)
** test_select_hyper_union_3d(): Test basic H5S (dataspace) selection code.
** Tests unions of hyperslabs in 3-D (Uses H5Scombine_hyperslab
** and H5Scombine_select instead of H5Sselect_hyperslab)
-**
+**
****************************************************************/
-static void
+static void
test_select_hyper_union_3d(void)
{
hid_t fid1; /* HDF5 File IDs */
@@ -3157,11 +3157,11 @@ test_select_hyper_union_3d(void)
/* Close memory dataspace */
ret = H5Sclose(sid2);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close Dataset */
ret = H5Dclose(dataset);
CHECK(ret, FAIL, "H5Dclose");
@@ -3180,9 +3180,9 @@ test_select_hyper_union_3d(void)
**
** test_select_hyper_and_2d(): Test basic H5S (dataspace) selection code.
** Tests 'and' of hyperslabs in 2-D
-**
+**
****************************************************************/
-static void
+static void
test_select_hyper_and_2d(void)
{
hid_t fid1; /* HDF5 File IDs */
@@ -3284,11 +3284,11 @@ test_select_hyper_and_2d(void)
/* Close memory dataspace */
ret = H5Sclose(sid2);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close Dataset */
ret = H5Dclose(dataset);
CHECK(ret, FAIL, "H5Dclose");
@@ -3306,9 +3306,9 @@ test_select_hyper_and_2d(void)
**
** test_select_hyper_xor_2d(): Test basic H5S (dataspace) selection code.
** Tests 'xor' of hyperslabs in 2-D
-**
+**
****************************************************************/
-static void
+static void
test_select_hyper_xor_2d(void)
{
hid_t fid1; /* HDF5 File IDs */
@@ -3412,11 +3412,11 @@ test_select_hyper_xor_2d(void)
/* Close memory dataspace */
ret = H5Sclose(sid2);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close Dataset */
ret = H5Dclose(dataset);
CHECK(ret, FAIL, "H5Dclose");
@@ -3434,9 +3434,9 @@ test_select_hyper_xor_2d(void)
**
** test_select_hyper_notb_2d(): Test basic H5S (dataspace) selection code.
** Tests 'notb' of hyperslabs in 2-D
-**
+**
****************************************************************/
-static void
+static void
test_select_hyper_notb_2d(void)
{
hid_t fid1; /* HDF5 File IDs */
@@ -3539,11 +3539,11 @@ test_select_hyper_notb_2d(void)
/* Close memory dataspace */
ret = H5Sclose(sid2);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close Dataset */
ret = H5Dclose(dataset);
CHECK(ret, FAIL, "H5Dclose");
@@ -3561,9 +3561,9 @@ test_select_hyper_notb_2d(void)
**
** test_select_hyper_nota_2d(): Test basic H5S (dataspace) selection code.
** Tests 'nota' of hyperslabs in 2-D
-**
+**
****************************************************************/
-static void
+static void
test_select_hyper_nota_2d(void)
{
hid_t fid1; /* HDF5 File IDs */
@@ -3666,11 +3666,11 @@ test_select_hyper_nota_2d(void)
/* Close memory dataspace */
ret = H5Sclose(sid2);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close Dataset */
ret = H5Dclose(dataset);
CHECK(ret, FAIL, "H5Dclose");
@@ -3687,9 +3687,9 @@ test_select_hyper_nota_2d(void)
/****************************************************************
**
** test_select_hyper_iter2(): Iterator for checking hyperslab iteration
-**
+**
****************************************************************/
-herr_t
+herr_t
test_select_hyper_iter2(void *_elem, hid_t UNUSED type_id, unsigned ndim, const hsize_t *point, void *_operator_data)
{
int *tbuf=(int *)_elem, /* temporary buffer pointer */
@@ -3718,9 +3718,9 @@ test_select_hyper_iter2(void *_elem, hid_t UNUSED type_id, unsigned ndim, const
**
** test_select_hyper_union_random_5d(): Test basic H5S (dataspace) selection code.
** Tests random unions of 5-D hyperslabs
-**
+**
****************************************************************/
-static void
+static void
test_select_hyper_union_random_5d(hid_t read_plist)
{
hid_t fid1; /* HDF5 File IDs */
@@ -3882,7 +3882,7 @@ printf("random I/O, after H5Dread()\n");
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close Dataset */
ret = H5Dclose(dataset);
CHECK(ret, FAIL, "H5Dclose");
@@ -3900,9 +3900,9 @@ printf("random I/O, after H5Dread()\n");
**
** test_select_hyper_chunk(): Test basic H5S (dataspace) selection code.
** Tests large hyperslab selection in chunked dataset
-**
+**
****************************************************************/
-static void
+static void
test_select_hyper_chunk(hid_t fapl_plist, hid_t xfer_plist)
{
hsize_t dimsf[3]; /* dataset dimensions */
@@ -3910,20 +3910,20 @@ test_select_hyper_chunk(hid_t fapl_plist, hid_t xfer_plist)
short *data; /* data to write */
short *tmpdata; /* data to write */
- /*
- * Data and output buffer initialization.
+ /*
+ * Data and output buffer initialization.
*/
hid_t file, dataset; /* handles */
- hid_t dataspace;
- hid_t memspace;
- hid_t plist;
+ hid_t dataspace;
+ hid_t memspace;
+ hid_t plist;
hsize_t dimsm[3]; /* memory space dimensions */
- hsize_t dims_out[3]; /* dataset dimensions */
- herr_t status;
+ hsize_t dims_out[3]; /* dataset dimensions */
+ herr_t status;
short *data_out; /* output buffer */
short *tmpdata_out; /* output buffer */
-
+
hsize_t count[3]; /* size of the hyperslab in the file */
hsize_t offset[3]; /* hyperslab offset in the file */
hsize_t count_out[3]; /* size of the hyperslab in memory */
@@ -3936,9 +3936,9 @@ test_select_hyper_chunk(hid_t fapl_plist, hid_t xfer_plist)
/* Allocate the transfer buffers */
data = HDmalloc(sizeof(short)*X*Y*Z);
data_out = HDcalloc(NX*NY*NZ,sizeof(short));
-
- /*
- * Data buffer initialization.
+
+ /*
+ * Data buffer initialization.
*/
tmpdata = data;
for (j = 0; j < X; j++)
@@ -3956,12 +3956,12 @@ test_select_hyper_chunk(hid_t fapl_plist, hid_t xfer_plist)
/*
* Describe the size of the array and create the data space for fixed
- * size dataset.
+ * size dataset.
*/
dimsf[0] = X;
dimsf[1] = Y;
dimsf[2] = Z;
- dataspace = H5Screate_simple (RANK_F, dimsf, NULL);
+ dataspace = H5Screate_simple (RANK_F, dimsf, NULL);
CHECK(dataspace, FAIL, "H5Screate_simple");
/*
@@ -3972,11 +3972,11 @@ test_select_hyper_chunk(hid_t fapl_plist, hid_t xfer_plist)
CHECK(plist, FAIL, "H5Pcreate");
status = H5Pset_chunk (plist, RANK_F, chunk_dimsf);
CHECK(status, FAIL, "H5Pset_chunk");
- dataset = H5Dcreate (file, DATASETNAME, H5T_NATIVE_UCHAR, dataspace, plist);
+ dataset = H5Dcreate (file, DATASETNAME, H5T_NATIVE_UCHAR, dataspace, plist);
CHECK(dataset, FAIL, "H5Dcreate");
- /*
- * Define hyperslab in the dataset.
+ /*
+ * Define hyperslab in the dataset.
*/
offset[0] = 0;
offset[1] = 0;
@@ -3984,7 +3984,7 @@ test_select_hyper_chunk(hid_t fapl_plist, hid_t xfer_plist)
count[0] = NX_SUB;
count[1] = NY_SUB;
count[2] = NZ_SUB;
- status = H5Sselect_hyperslab (dataspace, H5S_SELECT_SET, offset, NULL,
+ status = H5Sselect_hyperslab (dataspace, H5S_SELECT_SET, offset, NULL,
count, NULL);
CHECK(status, FAIL, "H5Sselect_hyperslab");
@@ -3994,11 +3994,11 @@ test_select_hyper_chunk(hid_t fapl_plist, hid_t xfer_plist)
dimsm[0] = NX;
dimsm[1] = NY;
dimsm[2] = NZ;
- memspace = H5Screate_simple (RANK_M, dimsm, NULL);
+ memspace = H5Screate_simple (RANK_M, dimsm, NULL);
CHECK(memspace, FAIL, "H5Screate_simple");
- /*
- * Define memory hyperslab.
+ /*
+ * Define memory hyperslab.
*/
offset_out[0] = 0;
offset_out[1] = 0;
@@ -4006,7 +4006,7 @@ test_select_hyper_chunk(hid_t fapl_plist, hid_t xfer_plist)
count_out[0] = NX_SUB;
count_out[1] = NY_SUB;
count_out[2] = NZ_SUB;
- status = H5Sselect_hyperslab (memspace, H5S_SELECT_SET, offset_out, NULL,
+ status = H5Sselect_hyperslab (memspace, H5S_SELECT_SET, offset_out, NULL,
count_out, NULL);
CHECK(status, FAIL, "H5Sselect_hyperslab");
@@ -4030,16 +4030,16 @@ test_select_hyper_chunk(hid_t fapl_plist, hid_t xfer_plist)
CHECK(status, FAIL, "H5Dclose");
status=H5Fclose (file);
CHECK(status, FAIL, "H5Fclose");
-
-/*************************************************************
- This reads the hyperslab from the test.h5 file just
- created, into a 3-dimensional plane of the 3-dimensional
+/*************************************************************
+
+ This reads the hyperslab from the test.h5 file just
+ created, into a 3-dimensional plane of the 3-dimensional
array.
- ************************************************************/
-
+ ************************************************************/
+
/*
* Open the file and the dataset.
*/
@@ -4058,8 +4058,8 @@ test_select_hyper_chunk(hid_t fapl_plist, hid_t xfer_plist)
VERIFY(dims_out[1], dimsf[1], "Dataset dimensions");
VERIFY(dims_out[2], dimsf[2], "Dataset dimensions");
- /*
- * Define hyperslab in the dataset.
+ /*
+ * Define hyperslab in the dataset.
*/
offset[0] = 0;
offset[1] = 0;
@@ -4067,7 +4067,7 @@ test_select_hyper_chunk(hid_t fapl_plist, hid_t xfer_plist)
count[0] = NX_SUB;
count[1] = NY_SUB;
count[2] = NZ_SUB;
- status = H5Sselect_hyperslab (dataspace, H5S_SELECT_SET, offset, NULL,
+ status = H5Sselect_hyperslab (dataspace, H5S_SELECT_SET, offset, NULL,
count, NULL);
CHECK(status, FAIL, "H5Sselect_hyperslab");
@@ -4077,11 +4077,11 @@ test_select_hyper_chunk(hid_t fapl_plist, hid_t xfer_plist)
dimsm[0] = NX;
dimsm[1] = NY;
dimsm[2] = NZ;
- memspace = H5Screate_simple (RANK_M, dimsm, NULL);
+ memspace = H5Screate_simple (RANK_M, dimsm, NULL);
CHECK(memspace, FAIL, "H5Screate_simple");
- /*
- * Define memory hyperslab.
+ /*
+ * Define memory hyperslab.
*/
offset_out[0] = 0;
offset_out[1] = 0;
@@ -4089,12 +4089,12 @@ test_select_hyper_chunk(hid_t fapl_plist, hid_t xfer_plist)
count_out[0] = NX_SUB;
count_out[1] = NY_SUB;
count_out[2] = NZ_SUB;
- status = H5Sselect_hyperslab (memspace, H5S_SELECT_SET, offset_out, NULL,
+ status = H5Sselect_hyperslab (memspace, H5S_SELECT_SET, offset_out, NULL,
count_out, NULL);
CHECK(status, FAIL, "H5Sselect_hyperslab");
/*
- * Read data from hyperslab in the file into the hyperslab in
+ * Read data from hyperslab in the file into the hyperslab in
* memory and display.
*/
status = H5Dread (dataset, H5T_NATIVE_SHORT, memspace, dataspace,
@@ -4131,9 +4131,9 @@ test_select_hyper_chunk(hid_t fapl_plist, hid_t xfer_plist)
** test_select_point_chunk(): Test basic H5S (dataspace) selection code.
** Tests combinations of hyperslab and point selections on
** chunked datasets.
-**
+**
****************************************************************/
-static void
+static void
test_select_point_chunk(void)
{
hsize_t dimsf[SPACE7_RANK]; /* dataset dimensions */
@@ -4141,23 +4141,23 @@ test_select_point_chunk(void)
unsigned *data; /* data to write */
unsigned *tmpdata; /* data to write */
- /*
- * Data and output buffer initialization.
+ /*
+ * Data and output buffer initialization.
*/
hid_t file, dataset; /* handles */
- hid_t dataspace;
+ hid_t dataspace;
hid_t pnt1_space; /* Dataspace to hold 1st point selection */
hid_t pnt2_space; /* Dataspace to hold 2nd point selection */
hid_t hyp1_space; /* Dataspace to hold 1st hyperslab selection */
hid_t hyp2_space; /* Dataspace to hold 2nd hyperslab selection */
- hid_t dcpl;
+ hid_t dcpl;
herr_t ret; /* Generic return value */
unsigned *data_out; /* output buffer */
#ifdef LATER
unsigned *tmpdata_out; /* output buffer */
#endif /* LATER */
-
+
hsize_t start[SPACE7_RANK]; /* hyperslab offset */
hsize_t count[SPACE7_RANK]; /* size of the hyperslab */
hsize_t points[SPACE7_NPOINTS][SPACE7_RANK]; /* points for selection */
@@ -4169,9 +4169,9 @@ test_select_point_chunk(void)
/* Allocate the transfer buffers */
data = (unsigned*)HDmalloc(sizeof(unsigned)*SPACE7_DIM1*SPACE7_DIM2);
data_out = (unsigned*)HDcalloc(SPACE7_DIM1*SPACE7_DIM2,sizeof(unsigned));
-
- /*
- * Data buffer initialization.
+
+ /*
+ * Data buffer initialization.
*/
tmpdata = data;
for (i = 0; i < SPACE7_DIM1; i++)
@@ -4189,7 +4189,7 @@ test_select_point_chunk(void)
/* Create file dataspace */
dimsf[0] = SPACE7_DIM1;
dimsf[1] = SPACE7_DIM2;
- dataspace = H5Screate_simple (SPACE7_RANK, dimsf, NULL);
+ dataspace = H5Screate_simple (SPACE7_RANK, dimsf, NULL);
CHECK(dataspace, FAIL, "H5Screate_simple");
/*
@@ -4200,7 +4200,7 @@ test_select_point_chunk(void)
CHECK(dcpl, FAIL, "H5Pcreate");
ret = H5Pset_chunk (dcpl, SPACE7_RANK, chunk_dimsf);
CHECK(ret, FAIL, "H5Pset_chunk");
- dataset = H5Dcreate (file, DATASETNAME, H5T_NATIVE_UCHAR, dataspace, dcpl);
+ dataset = H5Dcreate (file, DATASETNAME, H5T_NATIVE_UCHAR, dataspace, dcpl);
CHECK(dataset, FAIL, "H5Dcreate");
/* Create 1st point selection */
@@ -4325,9 +4325,9 @@ test_select_point_chunk(void)
**
** test_select_sclar_chunk(): Test basic H5S (dataspace) selection code.
** Tests using a scalar dataspace (in memory) to access chunked datasets.
-**
+**
****************************************************************/
-static void
+static void
test_select_scalar_chunk(void)
{
hid_t file_id; /* File ID */
@@ -4391,9 +4391,9 @@ test_select_scalar_chunk(void)
**
** test_select_valid(): Test basic H5S (dataspace) selection code.
** Tests selection validity
-**
+**
****************************************************************/
-static void
+static void
test_select_valid(void)
{
herr_t error;
@@ -4487,9 +4487,9 @@ test_select_valid(void)
** test_select_combine(): Test basic H5S (dataspace) selection code.
** Tests combining "all" and "none" selections with hyperslab
** operations.
-**
+**
****************************************************************/
-static void
+static void
test_select_combine(void)
{
hid_t base_id; /* Base dataspace for test */
@@ -4853,9 +4853,9 @@ typedef struct {
/****************************************************************
**
** test_select_hyper_iter3(): Iterator for checking hyperslab iteration
-**
+**
****************************************************************/
-herr_t
+herr_t
test_select_hyper_iter3(void *_elem, hid_t UNUSED type_id, unsigned ndim, const hsize_t *point, void *_operator_data)
{
unsigned short *tbuf=(unsigned short *)_elem; /* temporary buffer pointer */
@@ -4887,9 +4887,9 @@ test_select_hyper_iter3(void *_elem, hid_t UNUSED type_id, unsigned ndim, const
**
** test_select_fill_all(): Test basic H5S (dataspace) selection code.
** Tests filling "all" selections
-**
+**
****************************************************************/
-static void
+static void
test_select_fill_all(void)
{
hid_t sid1; /* Dataspace ID */
@@ -4951,7 +4951,7 @@ test_select_fill_all(void)
/* Close dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Free memory buffers */
HDfree(wbuf);
} /* test_select_fill_all() */
@@ -4960,9 +4960,9 @@ test_select_fill_all(void)
**
** test_select_fill_point(): Test basic H5S (dataspace) selection code.
** Tests filling "point" selections
-**
+**
****************************************************************/
-static void
+static void
test_select_fill_point(hssize_t *offset)
{
hid_t sid1; /* Dataspace ID */
@@ -5045,7 +5045,7 @@ test_select_fill_point(hssize_t *offset)
/* Close dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Free memory buffers */
HDfree(wbuf);
} /* test_select_fill_point() */
@@ -5054,9 +5054,9 @@ test_select_fill_point(hssize_t *offset)
**
** test_select_fill_hyper_simple(): Test basic H5S (dataspace) selection code.
** Tests filling "simple" (i.e. one block) hyperslab selections
-**
+**
****************************************************************/
-static void
+static void
test_select_fill_hyper_simple(hssize_t *offset)
{
hid_t sid1; /* Dataspace ID */
@@ -5144,7 +5144,7 @@ test_select_fill_hyper_simple(hssize_t *offset)
/* Close dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Free memory buffers */
HDfree(wbuf);
} /* test_select_fill_hyper_simple() */
@@ -5153,9 +5153,9 @@ test_select_fill_hyper_simple(hssize_t *offset)
**
** test_select_fill_hyper_regular(): Test basic H5S (dataspace) selection code.
** Tests filling "regular" (i.e. strided block) hyperslab selections
-**
+**
****************************************************************/
-static void
+static void
test_select_fill_hyper_regular(hssize_t *offset)
{
hid_t sid1; /* Dataspace ID */
@@ -5251,7 +5251,7 @@ test_select_fill_hyper_regular(hssize_t *offset)
/* Close dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Free memory buffers */
HDfree(wbuf);
} /* test_select_fill_hyper_regular() */
@@ -5260,9 +5260,9 @@ test_select_fill_hyper_regular(hssize_t *offset)
**
** test_select_fill_hyper_irregular(): Test basic H5S (dataspace) selection code.
** Tests filling "irregular" (i.e. combined blocks) hyperslab selections
-**
+**
****************************************************************/
-static void
+static void
test_select_fill_hyper_irregular(hssize_t *offset)
{
hid_t sid1; /* Dataspace ID */
@@ -5382,9 +5382,9 @@ test_select_fill_hyper_irregular(hssize_t *offset)
**
** test_select_none(): Test basic H5S (dataspace) selection code.
** Tests I/O on 0-sized point selections
-**
+**
****************************************************************/
-static void
+static void
test_select_none(void)
{
hid_t fid1; /* HDF5 File IDs */
@@ -5456,11 +5456,11 @@ test_select_none(void)
/* Close memory dataspace */
ret = H5Sclose(sid2);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close Dataset */
ret = H5Dclose(dataset);
CHECK(ret, FAIL, "H5Dclose");
@@ -5478,9 +5478,9 @@ test_select_none(void)
**
** test_scalar_select(): Test basic H5S (dataspace) selection code.
** Tests selections on scalar dataspaces
-**
+**
****************************************************************/
-static void
+static void
test_scalar_select(void)
{
hid_t fid1; /* HDF5 File IDs */
@@ -5606,11 +5606,11 @@ test_scalar_select(void)
/* Close memory dataspace */
ret = H5Sclose(sid2);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close Dataset */
ret = H5Dclose(dataset);
CHECK(ret, FAIL, "H5Dclose");
@@ -5627,11 +5627,11 @@ test_scalar_select(void)
/****************************************************************
**
** test_scalar_select2(): Tests selections on scalar dataspace,
-** verify H5Shyperslab and H5Sselect_elements fails for
+** verify H5Shyperslab and H5Sselect_elements fails for
** scalar dataspace.
-**
+**
****************************************************************/
-static void
+static void
test_scalar_select2(void)
{
hid_t sid; /* Dataspace ID */
@@ -5665,7 +5665,7 @@ test_scalar_select2(void)
/* Select no elements in memory & file with "none" selection */
ret = H5Sselect_none(sid);
CHECK(ret, FAIL, "H5Sselect_none");
-
+
/* Select all elements in memory & file with "all" selection */
ret = H5Sselect_all(sid);
CHECK(ret, FAIL, "H5Sselect_none");
@@ -5679,9 +5679,9 @@ test_scalar_select2(void)
**
** test_shape_same(): Tests selections on dataspace, verify that
** "shape same" routine is working correctly.
-**
+**
****************************************************************/
-static void
+static void
test_shape_same(void)
{
hid_t all_sid; /* Dataspace ID with "all" selection */
@@ -6534,9 +6534,9 @@ test_shape_same(void)
** test_select_hyper_chunk_offset(): Tests selections on dataspace,
** verify that offsets for hyperslab selections are working in
** chunked datasets.
-**
+**
****************************************************************/
-static void
+static void
test_select_hyper_chunk_offset(void)
{
hid_t fid; /* File ID */
@@ -6583,7 +6583,7 @@ test_select_hyper_chunk_offset(void)
/* Set the chunk size */
ret=H5Pset_chunk (dcpl, 1, chunks);
CHECK(ret, FAIL, "H5Pset_chunk");
-
+
/* Create dataspace for memory */
msid = H5Screate_simple (1, mem_dims, NULL);
CHECK(msid, FAIL, "H5Screate_simple");
@@ -6749,16 +6749,16 @@ test_select_hyper_chunk_offset(void)
** test_select_hyper_chunk_offset2(): Tests selections on dataspace,
** another test to verify that offsets for hyperslab selections are
** working in chunked datasets.
-**
+**
****************************************************************/
-static void
+static void
test_select_hyper_chunk_offset2(void)
{
hid_t file, dataset; /* handles */
- hid_t dataspace;
- hid_t memspace;
+ hid_t dataspace;
+ hid_t memspace;
hid_t dcpl; /* Dataset creation property list */
- herr_t status;
+ herr_t status;
unsigned data_out[SPACE12_DIM0]; /* output buffer */
unsigned data_in[SPACE12_CHUNK_DIM0]; /* input buffer */
hsize_t dims[SPACE12_RANK]={SPACE12_DIM0}; /* Dimension size */
@@ -6807,8 +6807,8 @@ test_select_hyper_chunk_offset2(void)
memspace = H5Screate_simple(SPACE12_RANK, chunk_dims, NULL);
CHECK(dataspace, FAIL, "H5Screate_simple");
- /*
- * Define hyperslab in the file dataspace.
+ /*
+ * Define hyperslab in the file dataspace.
*/
start[0] = 0;
count[0] = SPACE12_CHUNK_DIM0;
@@ -6821,7 +6821,7 @@ test_select_hyper_chunk_offset2(void)
offset[0] = u;
status = H5Soffset_simple(dataspace, offset);
CHECK(status, FAIL, "H5Soffset_simple");
-
+
/* Read in buffer of data */
status = H5Dread(dataset, H5T_NATIVE_UINT, memspace, dataspace,
H5P_DEFAULT, data_in);
@@ -6850,9 +6850,9 @@ test_select_hyper_chunk_offset2(void)
**
** test_select_bounds(): Tests selection bounds on dataspaces,
** both with and without offsets.
-**
+**
****************************************************************/
-static void
+static void
test_select_bounds(void)
{
hid_t sid; /* Dataspace ID */
@@ -7053,9 +7053,9 @@ test_select_bounds(void)
/****************************************************************
**
** test_select(): Main H5S selection testing routine.
-**
+**
****************************************************************/
-void
+void
test_select(void)
{
hid_t plist_id; /* Property list for reading random hyperslabs */
diff --git a/test/tskiplist.c b/test/tskiplist.c
index e1a1f43..9a29c95 100644
--- a/test/tskiplist.c
+++ b/test/tskiplist.c
@@ -58,9 +58,9 @@ static int tst_rev_sort(const void *i1, const void *i2)
**
** test_skiplist_init(): Test H5SL (skiplist) code.
** Initialize data for skip list testing
-**
+**
****************************************************************/
-static void
+static void
test_skiplist_init(void)
{
time_t curr_time; /* Current time, for seeding random number generator */
@@ -108,9 +108,9 @@ test_skiplist_init(void)
**
** test_skiplist_create(): Test basic H5SL (skiplist) code.
** Tests creating and closing skip lists.
-**
+**
****************************************************************/
-static void
+static void
test_skiplist_create(void)
{
H5SL_t *slist; /* Skip list created */
@@ -133,9 +133,9 @@ test_skiplist_create(void)
**
** test_skiplist_insert(): Test H5SL (skip list) code.
** Tests inserting single object into skip list.
-**
+**
****************************************************************/
-static void
+static void
test_skiplist_insert(void)
{
H5SL_t *slist; /* Skip list created */
@@ -196,9 +196,9 @@ test_skiplist_insert(void)
**
** test_skiplist_insert_many(): Test H5SL (skip list) code.
** Tests inserting many objects into skip list.
-**
+**
****************************************************************/
-static void
+static void
test_skiplist_insert_many(void)
{
H5SL_t *slist; /* Skip list created */
@@ -267,9 +267,9 @@ test_skiplist_insert_many(void)
**
** test_skiplist_remove(): Test H5SL (skip list) code.
** Tests basic object removal from skip list.
-**
+**
****************************************************************/
-static void
+static void
test_skiplist_remove(void)
{
H5SL_t *slist; /* Skip list created */
@@ -298,15 +298,15 @@ test_skiplist_remove(void)
VERIFY(found_item, NULL, "H5SL_remove");
/* Insert three objects into the skip list */
- key1=15;
+ key1=15;
ret=H5SL_insert(slist,&key1,&key1);
CHECK(ret, FAIL, "H5SL_insert");
- key2=10;
+ key2=10;
ret=H5SL_insert(slist,&key2,&key2);
CHECK(ret, FAIL, "H5SL_insert");
- key3=20;
+ key3=20;
ret=H5SL_insert(slist,&key3,&key3);
CHECK(ret, FAIL, "H5SL_insert");
@@ -349,9 +349,9 @@ test_skiplist_remove(void)
**
** test_skiplist_remove_many(): Test H5SL (skip list) code.
** Tests removing many objects from skip list.
-**
+**
****************************************************************/
-static void
+static void
test_skiplist_remove_many(void)
{
H5SL_t *slist; /* Skip list created */
@@ -448,9 +448,9 @@ test_skiplist_remove_many(void)
**
** test_skiplist_firstnext(): Test H5SL (skip list) code.
** Tests iterating over nodes in skip list with first/next calls.
-**
+**
****************************************************************/
-static void
+static void
test_skiplist_firstnext(void)
{
H5SL_t *slist; /* Skip list created */
@@ -514,9 +514,9 @@ test_skiplist_firstnext(void)
**
** test_skiplist_string(): Test H5SL (skip list) code.
** Tests using strings for keys in skip lists.
-**
+**
****************************************************************/
-static void
+static void
test_skiplist_string(void)
{
H5SL_t *slist; /* Skip list created */
@@ -604,9 +604,9 @@ test_skiplist_iter(void *item, void UNUSED *key, void *op_data)
**
** test_skiplist_iterate(): Test H5SL (skip list) code.
** Tests iterating over nodes in skip list with callbacks.
-**
+**
****************************************************************/
-static void
+static void
test_skiplist_iterate(void)
{
H5SL_t *slist; /* Skip list created */
@@ -650,9 +650,9 @@ test_skiplist_iterate(void)
**
** test_skiplist_hsize(): Test H5SL (skip list) code.
** Tests using hsize_t for keys in skip lists.
-**
+**
****************************************************************/
-static void
+static void
test_skiplist_hsize(void)
{
H5SL_t *slist; /* Skip list created */
@@ -705,9 +705,9 @@ test_skiplist_hsize(void)
**
** test_skiplist_unsigned(): Test H5SL (skip list) code.
** Tests using unsigned for keys in skip lists.
-**
+**
****************************************************************/
-static void
+static void
test_skiplist_unsigned(void)
{
H5SL_t *slist; /* Skip list created */
@@ -760,9 +760,9 @@ test_skiplist_unsigned(void)
**
** test_skiplist_lastprev(): Test H5SL (skip list) code.
** Tests iterating over nodes in skip list with last/prev calls.
-**
+**
****************************************************************/
-static void
+static void
test_skiplist_lastprev(void)
{
H5SL_t *slist; /* Skip list created */
@@ -826,9 +826,9 @@ test_skiplist_lastprev(void)
**
** test_skiplist_find(): Test H5SL (skip list) code.
** Tests 'find' operation in skip lists.
-**
+**
****************************************************************/
-static void
+static void
test_skiplist_find(void)
{
H5SL_t *slist; /* Skip list created */
@@ -882,9 +882,9 @@ test_skiplist_find(void)
**
** test_skiplist_add(): Test H5SL (skip list) code.
** Tests 'add' operation in skip lists.
-**
+**
****************************************************************/
-static void
+static void
test_skiplist_add(void)
{
H5SL_t *slist; /* Skip list created */
@@ -948,9 +948,9 @@ test_skiplist_destroy_free(void *item, void UNUSED *key, void *op_data)
**
** test_skiplist_destroy(): Test H5SL (skip list) code.
** Tests 'destroy' operation in skip lists.
-**
+**
****************************************************************/
-static void
+static void
test_skiplist_destroy(void)
{
H5SL_t *slist; /* Skip list created */
@@ -983,9 +983,9 @@ test_skiplist_destroy(void)
**
** test_skiplist_free(): Test H5SL (skip list) code.
** Tests 'free' operation in skip lists.
-**
+**
****************************************************************/
-static void
+static void
test_skiplist_free(void)
{
H5SL_t *slist; /* Skip list created */
@@ -1037,9 +1037,9 @@ test_skiplist_free(void)
**
** test_skiplist_less(): Test H5SL (skip list) code.
** Tests 'less' operation in skip lists.
-**
+**
****************************************************************/
-static void
+static void
test_skiplist_less(void)
{
H5SL_t *slist; /* Skip list created */
@@ -1100,7 +1100,7 @@ test_skiplist_less(void)
/****************************************************************
**
** test_skiplist(): Main H5SL testing routine.
-**
+**
****************************************************************/
void
test_skiplist(void)
diff --git a/test/ttime.c b/test/ttime.c
index 5f9b5e7..2578d6b 100644
--- a/test/ttime.c
+++ b/test/ttime.c
@@ -44,7 +44,7 @@ test_time_commit(void)
/* Create a new file using default properties. */
file_id = H5Fcreate(DATAFILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
CHECK(file_id, FAIL, "H5Fcreate");
-
+
tid = H5Tcopy (H5T_UNIX_D32LE);
CHECK(tid, FAIL, "H5Tcopy");
status = H5Tcommit(file_id, "Committed D32LE type", tid);
@@ -72,53 +72,53 @@ test_time_commit(void)
CHECK(status, FAIL, "H5Tcommit");
status = H5Tclose (tid);
CHECK(status, FAIL, "H5Tclose");
-
+
/* Close the file. */
status = H5Fclose(file_id);
CHECK(status, FAIL, "H5Fclose");
-
+
file_id = H5Fopen(DATAFILE, H5F_ACC_RDWR, H5P_DEFAULT);
CHECK(file_id, FAIL, "H5Fopen");
-
+
tid = H5Topen(file_id, "Committed D32LE type");
CHECK(tid, FAIL, "H5Topen");
-
+
if(!H5Tequal(tid, H5T_UNIX_D32LE))
TestErrPrintf("H5T_UNIX_D32LE datatype not found\n");
-
+
status = H5Tclose (tid);
CHECK(status, FAIL, "H5Tclose");
tid = H5Topen(file_id, "Committed D32BE type");
CHECK(tid, FAIL, "H5Topen");
-
+
if(!H5Tequal(tid, H5T_UNIX_D32BE))
TestErrPrintf("H5T_UNIX_D32BE datatype not found\n");
-
+
status = H5Tclose (tid);
CHECK(status, FAIL, "H5Tclose");
tid = H5Topen(file_id, "Committed D64LE type");
CHECK(tid, FAIL, "H5Topen");
-
+
if(!H5Tequal(tid, H5T_UNIX_D64LE))
TestErrPrintf("H5T_UNIX_D64LE datatype not found");
-
+
status = H5Tclose (tid);
CHECK(status, FAIL, "H5Tclose");
tid = H5Topen(file_id, "Committed D64BE type");
CHECK(tid, FAIL, "H5Topen");
-
+
if(!H5Tequal(tid, H5T_UNIX_D64BE))
TestErrPrintf("H5T_UNIX_D64BE datatype not found");
-
+
status = H5Tclose (tid);
CHECK(status, FAIL, "H5Tclose");
status = H5Fclose(file_id);
CHECK(status, FAIL, "H5Fclose");
-
+
}
#ifdef NOT_YET
@@ -143,7 +143,7 @@ test_time_io(void)
/* Create a new file using default properties. */
fid = H5Fcreate(DATAFILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
CHECK(fid, FAIL, "H5Fcreate");
-
+
/* Create a scalar dataspace */
sid = H5Screate(H5S_SCALAR);
CHECK(sid, FAIL, "H5Screate");
@@ -192,16 +192,16 @@ fprintf(stderr,"time written was: %s\n", HDctime(&timethen));
status = H5Fclose(fid);
CHECK(status, FAIL, "H5Fclose");
-
+
}
#endif /* NOT_YET */
/****************************************************************
**
** test_time(): Main time datatype testing routine.
-**
+**
****************************************************************/
-void
+void
test_time(void)
{
/* Output message about test being performed */
@@ -211,7 +211,7 @@ test_time(void)
#ifdef NOT_YET
test_time_io(); /* Test writing time data to a dataset */
#endif /* NOT_YET */
-
+
} /* test_time() */
diff --git a/test/ttsafe.c b/test/ttsafe.c
index 0e24bf3..3f66e4a 100644
--- a/test/ttsafe.c
+++ b/test/ttsafe.c
@@ -31,7 +31,7 @@
* BUGS/LIMITATIONS
*
* EXPORTED ROUTINES/VARIABLES:
- *
+ *
*/
#include "h5test.h"
diff --git a/test/ttsafe_acreate.c b/test/ttsafe_acreate.c
index f535541..311eec7 100644
--- a/test/ttsafe_acreate.c
+++ b/test/ttsafe_acreate.c
@@ -80,7 +80,7 @@ void tts_acreate(void)
int data; /* data to write */
int buffer, ret, i;
- ttsafe_name_data_t *attrib_data;
+ ttsafe_name_data_t *attrib_data;
/*
* Create an HDF5 file using H5F_ACC_TRUNC access, default file
diff --git a/test/ttsafe_cancel.c b/test/ttsafe_cancel.c
index f9a5047..e008fe2 100644
--- a/test/ttsafe_cancel.c
+++ b/test/ttsafe_cancel.c
@@ -24,7 +24,7 @@
*
* The cancellation should only work after the child thread has safely
* left the H5Diterate call.
- *
+ *
* Temporary files generated:
* ttsafe_cancel.h5
*
diff --git a/test/ttsafe_dcreate.c b/test/ttsafe_dcreate.c
index 8a4b38c..a3bc763 100644
--- a/test/ttsafe_dcreate.c
+++ b/test/ttsafe_dcreate.c
@@ -53,7 +53,7 @@ typedef struct thread_info {
int id;
hid_t file;
const char *dsetname;
-} thread_info;
+} thread_info;
/*
* Set individual dataset names (rather than generated the names
diff --git a/test/ttsafe_error.c b/test/ttsafe_error.c
index 4e6c516..c000a73 100644
--- a/test/ttsafe_error.c
+++ b/test/ttsafe_error.c
@@ -66,7 +66,7 @@ typedef struct err_num_struct {
hid_t min_num;
} err_num_t;
-err_num_t expected[8];
+err_num_t expected[8];
int error_flag = 0;
int error_count = 0;
@@ -82,28 +82,28 @@ void tts_error(void)
/* Must initialize these at runtime */
expected[0].maj_num = H5E_DATASET;
expected[0].min_num = H5E_CANTINIT;
-
+
expected[1].maj_num = H5E_DATASET;
expected[1].min_num = H5E_CANTINIT;
-
+
expected[2].maj_num = H5E_SYM;
expected[2].min_num = H5E_EXISTS;
-
+
expected[3].maj_num = H5E_SYM;
expected[3].min_num = H5E_CANTINSERT;
-
+
expected[4].maj_num = H5E_SYM;
expected[4].min_num = H5E_CANTINSERT;
-
+
expected[5].maj_num = H5E_BTREE;
expected[5].min_num = H5E_CANTINIT;
-
+
expected[6].maj_num = H5E_BTREE;
expected[6].min_num = H5E_CANTINSERT;
expected[7].maj_num = H5E_SYM;
expected[7].min_num = H5E_CANTINSERT;
-
+
/* set up mutex for global count of errors */
pthread_mutex_init(&error_mutex, NULL);
@@ -201,7 +201,7 @@ herr_t walk_error_callback(unsigned n, const H5E_error_t *err_desc, void UNUSED
if (err_desc) {
maj_num = err_desc->maj_num;
min_num = err_desc->min_num;
-
+
if (n < EXPECTED_ERROR_DEPTH && maj_num == expected[n].maj_num &&
min_num == expected[n].min_num)
return SUCCEED;
diff --git a/test/ttst.c b/test/ttst.c
index 5663050..2898681 100644
--- a/test/ttst.c
+++ b/test/ttst.c
@@ -67,9 +67,9 @@ static int tst_strcmp(const void *_s1, const void *_s2)
**
** test_tst_init(): Test basic H5ST (ternary search tree) selection code.
** Initialize data for TST testing
-**
+**
****************************************************************/
-static void
+static void
test_tst_init(void)
{
time_t curr_time; /* Current time, for seeding random number generator */
@@ -143,9 +143,9 @@ test_tst_init(void)
**
** test_tst_create(): Test basic H5ST (ternary search tree) selection code.
** Tests creating and closing TSTs.
-**
+**
****************************************************************/
-static void
+static void
test_tst_create(void)
{
H5ST_tree_t *tree; /* TST created */
@@ -173,9 +173,9 @@ test_tst_create(void)
**
** test_tst_insert(): Test basic H5ST (ternary search tree) selection code.
** Tests inserting key/value pairs into TST
-**
+**
****************************************************************/
-static void
+static void
test_tst_insert(void)
{
H5ST_tree_t *tree; /* TST created */
@@ -235,9 +235,9 @@ test_tst_insert(void)
**
** test_tst_iterate(): Test basic H5ST (ternary search tree) code.
** Tests iterating through key/value pairs in TST
-**
+**
****************************************************************/
-static void
+static void
test_tst_iterate(void)
{
H5ST_tree_t *tree; /* TST created */
@@ -281,9 +281,9 @@ test_tst_iterate(void)
**
** test_tst_remove(): Test basic H5ST (ternary search tree) code.
** Tests removing key/value pairs by string value in TST
-**
+**
****************************************************************/
-static void
+static void
test_tst_remove(void)
{
H5ST_tree_t *tree; /* TST created */
@@ -354,9 +354,9 @@ test_tst_remove(void)
**
** test_tst_finalize(): Test basic H5ST (ternary search tree) selection code.
** Wrap up data for TST testing
-**
+**
****************************************************************/
-static void
+static void
test_tst_finalize(void)
{
/* Release memory for unordered, randomized and sorted order unique words */
@@ -368,7 +368,7 @@ test_tst_finalize(void)
/****************************************************************
**
** test_tst(): Main H5ST selection testing routine.
-**
+**
****************************************************************/
void
test_tst(void)
diff --git a/test/tunicode.c b/test/tunicode.c
index 010d12a..22146bf 100644
--- a/test/tunicode.c
+++ b/test/tunicode.c
@@ -71,7 +71,7 @@ void test_fl_string(hid_t fid, const char *string)
char read_buf[MAX_STRING_LENGTH];
H5T_cset_t cset;
herr_t ret;
-
+
/* Create the datatype, ensure that the character set behaves
* correctly (it should default to ASCII and can be set to UTF8)
*/
@@ -221,7 +221,7 @@ void test_strpad(hid_t UNUSED fid, const char *string)
}
/* Create a src_type that holds the UTF-8 string */
- big_len = length;
+ big_len = length;
src_type = mkstr(big_len, H5T_STR_NULLPAD);
CHECK(src_type, FAIL, "mkstr");
/* Create a dst_type that holds half of the UTF-8 string */
@@ -689,7 +689,7 @@ void test_enum(hid_t UNUSED fid, const char * string)
/*
* test_opaque
- * Test comments on opaque datatypes
+ * Test comments on opaque datatypes
*/
void test_opaque(hid_t UNUSED fid, const char * string)
{
@@ -773,7 +773,7 @@ void dump_string(const char * string)
printf("The string was:\n");
printf(string);
printf("Or in hex:\n");
-
+
length = strlen(string);
for(x=0; x<length; x++)
diff --git a/test/tvlstr.c b/test/tvlstr.c
index 52d883b..8a8f5cb 100644
--- a/test/tvlstr.c
+++ b/test/tvlstr.c
@@ -60,7 +60,7 @@ void test_vlstr_free_custom(void *mem, void *info);
** allocation routines. This routine just uses malloc to
** allocate the memory and increments the amount of memory
** allocated.
-**
+**
****************************************************************/
void *test_vlstr_alloc_custom(size_t size, void *info)
{
@@ -88,7 +88,7 @@ void *test_vlstr_alloc_custom(size_t size, void *info)
** allocation routines. This routine just uses free to
** release the memory and decrements the amount of memory
** allocated.
-**
+**
****************************************************************/
void test_vlstr_free_custom(void *_mem, void *info)
{
@@ -113,7 +113,7 @@ void test_vlstr_free_custom(void *_mem, void *info)
**
** test_vlstrings_basic(): Test basic VL string code.
** Tests simple VL string I/O
-**
+**
****************************************************************/
static void
test_vlstrings_basic(void)
@@ -166,7 +166,7 @@ test_vlstrings_basic(void)
CHECK(ret, FAIL, "H5Dwrite");
dataspace = H5Screate(H5S_SCALAR);
-
+
dataset2=H5Dcreate(fid1,"Dataset2",tid1,dataspace,H5P_DEFAULT);
CHECK(dataset, FAIL, "H5Dcreate");
@@ -175,7 +175,7 @@ test_vlstrings_basic(void)
ret=H5Dwrite(dataset2,tid1,H5S_ALL,H5S_ALL,H5P_DEFAULT,&wdata2);
CHECK(ret, FAIL, "H5Dwrite");
-
+
H5Sclose(dataspace);
H5Dclose(dataset2);
HDfree(wdata2);
@@ -235,11 +235,11 @@ test_vlstrings_basic(void)
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close dataset transfer property list */
ret = H5Pclose(xfer_pid);
CHECK(ret, FAIL, "H5Pclose");
-
+
/* Close file */
ret = H5Fclose(fid1);
CHECK(ret, FAIL, "H5Fclose");
@@ -248,9 +248,9 @@ test_vlstrings_basic(void)
/****************************************************************
**
-** test_vlstrings_special(): Test VL string code for special
+** test_vlstrings_special(): Test VL string code for special
** string cases, nil and zero-sized.
-**
+**
****************************************************************/
static void
test_vlstrings_special(void)
@@ -298,7 +298,7 @@ test_vlstrings_special(void)
for(i=0; i<SPACE1_DIM1; i++)
if(rdata[i]!=NULL)
TestErrPrintf("VL doesn't match!, rdata[%d]=%p\n",(int)i,rdata[i]);
-
+
/* Write dataset to disk */
ret=H5Dwrite(dataset,tid1,H5S_ALL,H5S_ALL,H5P_DEFAULT,wdata);
CHECK(ret, FAIL, "H5Dwrite");
@@ -318,7 +318,7 @@ test_vlstrings_special(void)
continue;
} /* end if */
} /* end for */
-
+
/* Reclaim the read VL data */
ret=H5Dvlen_reclaim(tid1,sid1,H5P_DEFAULT,rdata);
CHECK(ret, FAIL, "H5Dvlen_reclaim");
@@ -342,7 +342,7 @@ test_vlstrings_special(void)
/* Close dataset creation property list */
ret = H5Pclose(dcpl);
CHECK(ret, FAIL, "H5Pclose");
-
+
/* Read from dataset before writing data */
ret=H5Dread(dataset,tid1,H5S_ALL,H5S_ALL,H5P_DEFAULT,rdata);
CHECK(ret, FAIL, "H5Dread");
@@ -351,7 +351,7 @@ test_vlstrings_special(void)
for(i=0; i<SPACE1_DIM1; i++)
if(rdata[i]!=NULL)
TestErrPrintf("VL doesn't match!, rdata[%d]=%p\n",(int)i,rdata[i]);
-
+
/* Try to write nil strings to disk. */
ret=H5Dwrite(dataset,tid1,H5S_ALL,H5S_ALL,H5P_DEFAULT,wdata2);
CHECK(ret, FAIL, "H5Dwrite");
@@ -364,7 +364,7 @@ test_vlstrings_special(void)
for(i=0; i<SPACE1_DIM1; i++)
if(rdata[i]!=NULL)
TestErrPrintf("VL doesn't match!, rdata[%d]=%p\n",(int)i,rdata[i]);
-
+
/* Close Dataset */
ret = H5Dclose(dataset);
CHECK(ret, FAIL, "H5Dclose");
@@ -376,7 +376,7 @@ test_vlstrings_special(void)
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close file */
ret = H5Fclose(fid1);
CHECK(ret, FAIL, "H5Fclose");
@@ -385,7 +385,7 @@ test_vlstrings_special(void)
/****************************************************************
**
** test_vlstring_type(): Test VL string type.
-** Tests if VL string is treated as string.
+** Tests if VL string is treated as string.
**
****************************************************************/
static void test_vlstring_type(void)
@@ -407,7 +407,7 @@ static void test_vlstring_type(void)
tid_vlstr = H5Tcopy(H5T_C_S1);
CHECK(tid_vlstr, FAIL, "H5Tcopy");
- /* Change padding and verify it */
+ /* Change padding and verify it */
ret = H5Tset_strpad(tid_vlstr, H5T_STR_NULLPAD);
CHECK(ret, FAIL, "H5Tset_strpad");
pad = H5Tget_strpad(tid_vlstr);
@@ -422,7 +422,7 @@ static void test_vlstring_type(void)
VERIFY(ret, H5T_STRING, "H5Tget_class");
ret = H5Tis_variable_str(tid_vlstr);
VERIFY(ret, TRUE, "H5Tis_variable_str");
-
+
/* Check default character set and padding */
cset = H5Tget_cset(tid_vlstr);
VERIFY(cset, H5T_CSET_ASCII, "H5Tget_cset");
@@ -436,25 +436,25 @@ static void test_vlstring_type(void)
/* Close datatype */
ret = H5Tclose(tid_vlstr);
CHECK(ret, FAIL, "H5Tclose");
-
+
tid_vlstr = H5Topen(fid, VLSTR_TYPE);
CHECK(tid_vlstr, FAIL, "H5Topen");
ret = H5Tclose(tid_vlstr);
CHECK(ret, FAIL, "H5Tclose");
-
+
ret = H5Fclose(fid);
- CHECK(ret, FAIL, "H5Fclose");
+ CHECK(ret, FAIL, "H5Fclose");
fid = H5Fopen(DATAFILE, H5F_ACC_RDWR, H5P_DEFAULT);
CHECK(fid, FAIL, "H5Fopen");
-
- /* Open the variable-length string datatype just created */
+
+ /* Open the variable-length string datatype just created */
tid_vlstr = H5Topen(fid, VLSTR_TYPE);
CHECK(tid_vlstr, FAIL, "H5Topen");
- /* Verify character set and padding */
+ /* Verify character set and padding */
cset = H5Tget_cset(tid_vlstr);
VERIFY(cset, H5T_CSET_ASCII, "H5Tget_cset");
pad = H5Tget_strpad(tid_vlstr);
@@ -464,7 +464,7 @@ static void test_vlstring_type(void)
ret = H5Tclose(tid_vlstr);
CHECK(ret, FAIL, "H5Tclose");
ret = H5Fclose(fid);
- CHECK(ret, FAIL, "H5Fclose");
+ CHECK(ret, FAIL, "H5Fclose");
} /* end test_vlstring_type() */
@@ -472,7 +472,7 @@ static void test_vlstring_type(void)
**
** test_compact_vlstring(): Test code for storing VL strings in
** compact datasets.
-**
+**
****************************************************************/
static void
test_compact_vlstring(void)
@@ -511,7 +511,7 @@ test_compact_vlstring(void)
ret = H5Pset_layout(plist, H5D_COMPACT);
CHECK(ret, FAIL, "H5Pset_layout");
-
+
/* Create a dataset */
dataset=H5Dcreate(fid1,"Dataset5",tid1,sid1,plist);
CHECK(dataset, FAIL, "H5Dcreate");
@@ -535,7 +535,7 @@ test_compact_vlstring(void)
continue;
} /* end if */
} /* end for */
-
+
/* Reclaim the read VL data */
ret=H5Dvlen_reclaim(tid1,sid1,H5P_DEFAULT,rdata);
CHECK(ret, FAIL, "H5Dvlen_reclaim");
@@ -551,11 +551,11 @@ test_compact_vlstring(void)
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close dataset create property list */
ret = H5Pclose(plist);
CHECK(ret, FAIL, "H5Pclose");
-
+
/* Close file */
ret = H5Fclose(fid1);
CHECK(ret, FAIL, "H5Fclose");
@@ -565,7 +565,7 @@ test_compact_vlstring(void)
**
** test_write_vl_string_attribute(): Test basic VL string code.
** Tests writing VL strings as attributes
-**
+**
****************************************************************/
static void test_write_vl_string_attribute(void)
{
@@ -651,7 +651,7 @@ static void test_write_vl_string_attribute(void)
**
** test_read_vl_string_attribute(): Test basic VL string code.
** Tests reading VL strings from attributes
-**
+**
****************************************************************/
static void test_read_vl_string_attribute(void)
{
@@ -677,7 +677,7 @@ static void test_read_vl_string_attribute(void)
/* Test reading "normal" sized string attribute */
att = H5Aopen_name(root, "test_scalar");
CHECK(att, FAIL, "H5Aopen_name");
-
+
ret = H5Aread(att, type, &string_att_check);
CHECK(ret, FAIL, "H5Aread");
@@ -692,7 +692,7 @@ static void test_read_vl_string_attribute(void)
/* Test reading "large" sized string attribute */
att = H5Aopen_name(root, "test_scalar_large");
CHECK(att, FAIL, "H5Aopen_name");
-
+
ret = H5Aread(att, type, &string_att_check);
CHECK(ret, FAIL, "H5Aread");
@@ -760,7 +760,7 @@ static void read_scalar_dset(hid_t file, hid_t type, hid_t space, char *name, ch
** test_vl_rewrite(): Test basic VL string code.
** Tests I/O on VL strings when lots of objects in the file
** have been linked/unlinked.
-**
+**
****************************************************************/
static void test_vl_rewrite(void)
{
@@ -841,9 +841,9 @@ static void test_vl_rewrite(void)
/****************************************************************
**
** test_vlstrings(): Main VL string testing routine.
-**
+**
****************************************************************/
-void
+void
test_vlstrings(void)
{
/* Output message about test being performed */
@@ -853,8 +853,8 @@ test_vlstrings(void)
/* Test basic VL string datatype */
test_vlstrings_basic();
test_vlstrings_special();
- test_vlstring_type();
- test_compact_vlstring();
+ test_vlstring_type();
+ test_compact_vlstring();
/* Test using VL strings in attributes */
test_write_vl_string_attribute();
diff --git a/test/tvltypes.c b/test/tvltypes.c
index f510230..df72c52 100644
--- a/test/tvltypes.c
+++ b/test/tvltypes.c
@@ -28,7 +28,7 @@
/* 1-D dataset with fixed dimensions */
#define SPACE1_RANK 1
-#define SPACE1_DIM1 4
+#define SPACE1_DIM1 4
/* 2-D dataset with fixed dimensions */
#define SPACE2_RANK 2
@@ -39,7 +39,7 @@
#define SPACE3_RANK 1
#define SPACE3_DIM1 128
#define L1_INCM 16
-#define L2_INCM 8
+#define L2_INCM 8
void *test_vltypes_alloc_custom(size_t size, void *info);
void test_vltypes_free_custom(void *mem, void *info);
@@ -50,7 +50,7 @@ void test_vltypes_free_custom(void *mem, void *info);
** allocation routines. This routine just uses malloc to
** allocate the memory and increments the amount of memory
** allocated.
-**
+**
****************************************************************/
void *test_vltypes_alloc_custom(size_t size, void *info)
{
@@ -78,7 +78,7 @@ void *test_vltypes_alloc_custom(size_t size, void *info)
** allocation routines. This routine just uses free to
** release the memory and decrements the amount of memory
** allocated.
-**
+**
****************************************************************/
void test_vltypes_free_custom(void *_mem, void *info)
{
@@ -101,8 +101,8 @@ void test_vltypes_free_custom(void *_mem, void *info)
/****************************************************************
**
-** test_vltypes_data_create(): Dataset of VL is supposed to
-** fail when fill value is never written to dataset.
+** test_vltypes_data_create(): Dataset of VL is supposed to
+** fail when fill value is never written to dataset.
**
****************************************************************/
static void
@@ -142,7 +142,7 @@ test_vltypes_dataset_create(void)
/* Create a dataset, supposed to fail */
H5E_BEGIN_TRY {
dataset=H5Dcreate(fid1,"Dataset1",tid1,sid1,dcpl);
- } H5E_END_TRY;
+ } H5E_END_TRY;
VERIFY(dataset, FAIL, "H5Dcreate");
/* Close datatype */
@@ -166,9 +166,9 @@ test_vltypes_dataset_create(void)
**
** test_vltypes_vlen_atomic(): Test basic VL datatype code.
** Tests VL datatypes of atomic datatypes
-**
+**
****************************************************************/
-static void
+static void
test_vltypes_vlen_atomic(void)
{
hvl_t wdata[SPACE1_DIM1]; /* Information to write */
@@ -226,7 +226,7 @@ test_vltypes_vlen_atomic(void)
for(i=0; i<SPACE1_DIM1; i++)
if(rdata[i].len!=0 || rdata[i].p!=NULL)
TestErrPrintf("VL doesn't match!, rdata[%d].len=%u, rdata[%d].p=%p\n",(int)i,(unsigned)rdata[i].len,(int)i,rdata[i].p);
-
+
/* Write "nil" data to disk */
ret=H5Dwrite(dataset,tid1,H5S_ALL,H5S_ALL,H5P_DEFAULT,wdata2);
CHECK(ret, FAIL, "H5Dwrite");
@@ -239,7 +239,7 @@ test_vltypes_vlen_atomic(void)
for(i=0; i<SPACE1_DIM1; i++)
if(rdata[i].len!=0 || rdata[i].p!=NULL)
TestErrPrintf("VL doesn't match!, rdata[%d].len=%u, rdata[%d].p=%p\n",(int)i,(unsigned)rdata[i].len,(int)i,rdata[i].p);
-
+
/* Write dataset to disk */
ret=H5Dwrite(dataset,tid1,H5S_ALL,H5S_ALL,H5P_DEFAULT,wdata);
CHECK(ret, FAIL, "H5Dwrite");
@@ -264,7 +264,7 @@ test_vltypes_vlen_atomic(void)
/* Close dataset creation property list */
ret = H5Pclose(dcpl_pid);
CHECK(ret, FAIL, "H5Pclose");
-
+
/* Read from dataset before writing data */
ret=H5Dread(dataset,tid1,H5S_ALL,H5S_ALL,H5P_DEFAULT,rdata);
CHECK(ret, FAIL, "H5Dread");
@@ -273,7 +273,7 @@ test_vltypes_vlen_atomic(void)
for(i=0; i<SPACE1_DIM1; i++)
if(rdata[i].len!=0 || rdata[i].p!=NULL)
TestErrPrintf("VL doesn't match!, rdata[%d].len=%u, rdata[%d].p=%p\n",(int)i,(unsigned)rdata[i].len,(int)i,rdata[i].p);
-
+
/* Write "nil" data to disk */
ret=H5Dwrite(dataset,tid1,H5S_ALL,H5S_ALL,H5P_DEFAULT,wdata2);
CHECK(ret, FAIL, "H5Dwrite");
@@ -286,7 +286,7 @@ test_vltypes_vlen_atomic(void)
for(i=0; i<SPACE1_DIM1; i++)
if(rdata[i].len!=0 || rdata[i].p!=NULL)
TestErrPrintf("VL doesn't match!, rdata[%d].len=%u, rdata[%d].p=%p\n",(int)i,(unsigned)rdata[i].len,(int)i,rdata[i].p);
-
+
/* Write data to disk */
ret=H5Dwrite(dataset,tid1,H5S_ALL,H5S_ALL,H5P_DEFAULT,wdata);
CHECK(ret, FAIL, "H5Dwrite");
@@ -378,11 +378,11 @@ test_vltypes_vlen_atomic(void)
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close dataset transfer property list */
ret = H5Pclose(xfer_pid);
CHECK(ret, FAIL, "H5Pclose");
-
+
/* Open second dataset */
dataset=H5Dopen(fid1,"Dataset2");
@@ -471,11 +471,11 @@ test_vltypes_vlen_atomic(void)
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close dataset transfer property list */
ret = H5Pclose(xfer_pid);
CHECK(ret, FAIL, "H5Pclose");
-
+
/* Close file */
ret = H5Fclose(fid1);
CHECK(ret, FAIL, "H5Fclose");
@@ -643,9 +643,9 @@ rewrite_vltypes_vlen_atomic(void)
**
** test_vltypes_vlen_compound(): Test basic VL datatype code.
** Test VL datatypes of compound datatypes
-**
+**
****************************************************************/
-static void
+static void
test_vltypes_vlen_compound(void)
{
typedef struct { /* Struct that the VL sequences are composed of */
@@ -774,11 +774,11 @@ test_vltypes_vlen_compound(void)
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close dataset transfer property list */
ret = H5Pclose(xfer_pid);
CHECK(ret, FAIL, "H5Pclose");
-
+
/* Close file */
ret = H5Fclose(fid1);
CHECK(ret, FAIL, "H5Fclose");
@@ -934,9 +934,9 @@ rewrite_vltypes_vlen_compound(void)
**
** test_vltypes_compound_vlen_vlen(): Test basic VL datatype code.
** Tests compound datatypes with VL datatypes of VL datatypes.
-**
+**
****************************************************************/
-static void
+static void
test_vltypes_compound_vlen_vlen(void)
{
typedef struct { /* Struct that the compound type are composed of */
@@ -1024,7 +1024,7 @@ test_vltypes_compound_vlen_vlen(void)
/* Open a dataset */
dataset=H5Dopen(fid1,"Dataset1");
CHECK(dataset, FAIL, "H5Dopen");
-
+
/* Read dataset from disk */
ret=H5Dread(dataset,tid2,H5S_ALL,H5S_ALL,H5P_DEFAULT,rdata);
CHECK(ret, FAIL, "H5Dread");
@@ -1039,7 +1039,7 @@ test_vltypes_compound_vlen_vlen(void)
TestErrPrintf("Float components don't match!, wdata[%d].f=%f, rdata[%d].f=%f\n",(int)i,(double)wdata[i].f,(int)i,(double)rdata[i].f);
continue;
} /* end if */
-
+
if(wdata[i].v.len!=rdata[i].v.len) {
TestErrPrintf("%d: VL data length don't match!, wdata[%d].v.len=%d, rdata[%d].v.len=%d\n",__LINE__,(int)i,(int)wdata[i].v.len,(int)i,(int)rdata[i].v.len);
continue;
@@ -1062,7 +1062,7 @@ test_vltypes_compound_vlen_vlen(void)
/* Reclaim the VL data */
ret=H5Dvlen_reclaim(tid2,sid1,H5P_DEFAULT,rdata);
CHECK(ret, FAIL, "H5Dvlen_reclaim");
-
+
/* Reclaim the write VL data */
ret=H5Dvlen_reclaim(tid2,sid1,H5P_DEFAULT,wdata);
CHECK(ret, FAIL, "H5Dvlen_reclaim");
@@ -1082,7 +1082,7 @@ test_vltypes_compound_vlen_vlen(void)
/* Close datatype */
ret = H5Tclose(tid1);
CHECK(ret, FAIL, "H5Tclose");
-
+
/* Close datatype */
ret = H5Tclose(tid3);
CHECK(ret, FAIL, "H5Tclose");
@@ -1096,9 +1096,9 @@ test_vltypes_compound_vlen_vlen(void)
**
** test_vltypes_compound_vlen_atomic(): Test basic VL datatype code.
** Tests compound datatypes with VL datatypes of atomic datatypes.
-**
+**
****************************************************************/
-static void
+static void
test_vltypes_compound_vlen_atomic(void)
{
typedef struct { /* Struct that the VL sequences are composed of */
@@ -1236,7 +1236,7 @@ test_vltypes_compound_vlen_atomic(void)
/* Close dataset creation property list */
ret = H5Pclose(dcpl_pid);
CHECK(ret, FAIL, "H5Pclose");
-
+
/* Read from dataset before writing data */
ret=H5Dread(dataset,tid2,H5S_ALL,H5S_ALL,H5P_DEFAULT,rdata);
CHECK(ret, FAIL, "H5Dread");
@@ -1245,7 +1245,7 @@ test_vltypes_compound_vlen_atomic(void)
for(i=0; i<SPACE1_DIM1; i++)
if(rdata[i].i!=0 || rdata[i].f!=0.0 || rdata[i].v.len!=0 || rdata[i].v.p!=NULL)
TestErrPrintf("VL doesn't match!, rdata[%d].i=%d, rdata[%d].f=%f, rdata[%d].v.len=%u, rdata[%d].v.p=%p\n",(int)i,rdata[i].i,(int)i,rdata[i].f,(int)i,(unsigned)rdata[i].v.len,(int)i,rdata[i].v.p);
-
+
/* Write dataset to disk */
ret=H5Dwrite(dataset,tid2,H5S_ALL,H5S_ALL,H5P_DEFAULT,wdata);
CHECK(ret, FAIL, "H5Dwrite");
@@ -1299,11 +1299,11 @@ test_vltypes_compound_vlen_atomic(void)
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close dataset transfer property list */
ret = H5Pclose(xfer_pid);
CHECK(ret, FAIL, "H5Pclose");
-
+
/* Close file */
ret = H5Fclose(fid1);
CHECK(ret, FAIL, "H5Fclose");
@@ -1312,9 +1312,9 @@ test_vltypes_compound_vlen_atomic(void)
/****************************************************************
**
-** rewrite_vltypes_compound_vlen_atomic(): Check memory leak for
+** rewrite_vltypes_compound_vlen_atomic(): Check memory leak for
** basic VL datatype code.
-** Check memory leak for compound datatypes with VL datatypes
+** Check memory leak for compound datatypes with VL datatypes
** of atomic datatypes.
**
****************************************************************/
@@ -1469,7 +1469,7 @@ rewrite_vltypes_compound_vlen_atomic(void)
**
** vlen_size_func(): Test basic VL datatype code.
** Tests VL datatype with VL datatypes of atomic datatypes.
-**
+**
****************************************************************/
static size_t vlen_size_func(unsigned long n)
{
@@ -1489,9 +1489,9 @@ static size_t vlen_size_func(unsigned long n)
**
** test_vltypes_vlen_vlen_atomic(): Test basic VL datatype code.
** Tests VL datatype with VL datatypes of atomic datatypes.
-**
+**
****************************************************************/
-static void
+static void
test_vltypes_vlen_vlen_atomic(void)
{
hvl_t wdata[SPACE1_DIM1]; /* Information to write */
@@ -1570,7 +1570,7 @@ test_vltypes_vlen_vlen_atomic(void)
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close file */
ret = H5Fclose(fid1);
CHECK(ret, FAIL, "H5Fclose");
@@ -1665,11 +1665,11 @@ test_vltypes_vlen_vlen_atomic(void)
/* Close disk dataspace */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
-
+
/* Close dataset transfer property list */
ret = H5Pclose(xfer_pid);
CHECK(ret, FAIL, "H5Pclose");
-
+
/* Close file */
ret = H5Fclose(fid1);
CHECK(ret, FAIL, "H5Fclose");
@@ -1845,7 +1845,7 @@ rewrite_longer_vltypes_vlen_vlen_atomic(void)
/* Close dataset transfer property list */
ret = H5Pclose(xfer_pid);
CHECK(ret, FAIL, "H5Pclose");
-
+
/* Close file */
ret = H5Fclose(fid1);
CHECK(ret, FAIL, "H5Fclose");
@@ -1987,7 +1987,7 @@ rewrite_shorter_vltypes_vlen_vlen_atomic(void)
continue;
} /* end if */
for(k=0; k<t2->len; k++) {
- if( ((unsigned int *)t1->p)[k] != ((unsigned int *)t2->p)[k] ) {
+ if( ((unsigned int *)t1->p)[k] != ((unsigned int *)t2->p)[k] ) {
TestErrPrintf("VL data values don't match!, t1->p[%d]=%d, t2->p[%d]=%d\n",(int)k, (int)((unsigned int *)t1->p)[k], (int)k, (int)((unsigned int *)t2->p)[k]);
continue;
} /* end if */
@@ -2031,9 +2031,9 @@ rewrite_shorter_vltypes_vlen_vlen_atomic(void)
/****************************************************************
**
** test_vltypes(): Main VL datatype testing routine.
-**
+**
****************************************************************/
-void
+void
test_vltypes(void)
{
/* Output message about test being performed */
diff --git a/test/unlink.c b/test/unlink.c
index 137bc88..c8b7ddc 100644
--- a/test/unlink.c
+++ b/test/unlink.c
@@ -92,7 +92,7 @@ test_one(hid_t file)
{
hid_t work=-1, grp=-1;
herr_t status;
-
+
/* Create a test group */
if ((work=H5Gcreate(file, "/test_one", 0))<0) goto error;
@@ -160,7 +160,7 @@ test_many(hid_t file)
int i;
const int how_many=500;
char name[32];
-
+
/* Create a test group */
if ((work=H5Gcreate(file, "/test_many", 0))<0) goto error;
if ((grp = H5Gcreate(work, "/test_many_foo", 0))<0) goto error;
@@ -205,7 +205,7 @@ test_many(hid_t file)
if (H5Gunlink(work, name)<0) goto error;
}
PASSED();
-
+
/* Create a bunch of names and unlink them from the midle */
TESTING("outward unlink");
for (i=0; i<how_many; i++) {
@@ -221,12 +221,12 @@ test_many(hid_t file)
if (H5Gunlink(work, name)<0) goto error;
}
PASSED();
-
+
/* Cleanup */
if (H5Gclose(work)<0) goto error;
return 0;
-
+
error:
H5E_BEGIN_TRY {
H5Gclose(work);
@@ -258,7 +258,7 @@ test_symlink(hid_t file)
hid_t work=-1;
TESTING("symlink removal");
-
+
/* Create a test group and symlink */
if ((work=H5Gcreate(file, "/test_symlink", 0))<0) goto error;
if (H5Glink(work, H5G_LINK_SOFT, "link_value", "link")<0) goto error;
@@ -268,7 +268,7 @@ test_symlink(hid_t file)
if (H5Gclose(work)<0) goto error;
PASSED();
return 0;
-
+
error:
H5E_BEGIN_TRY {
H5Gclose(work);
@@ -319,7 +319,7 @@ test_rename(hid_t file)
/* Cleanup */
if (H5Gclose(work)<0) goto error;
return 0;
-
+
error:
H5E_BEGIN_TRY {
H5Gclose(work);
@@ -329,7 +329,7 @@ test_rename(hid_t file)
return 1;
}
-
+
/*-------------------------------------------------------------------------
* Function: test_new_move
*
@@ -339,8 +339,8 @@ test_rename(hid_t file)
*
* Failure: number of errors
*
- * Programmer: Raymond Lu
- * Thursday, April 25, 2002
+ * Programmer: Raymond Lu
+ * Thursday, April 25, 2002
*
* Modifications:
*
@@ -354,8 +354,8 @@ test_new_move(void)
char filename[1024];
TESTING("new move");
-
- /* Create a second file */
+
+ /* Create a second file */
fapl = h5_fileaccess();
h5_fixname(FILENAME[1], fapl, filename, sizeof filename);
if ((file_a=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0)
@@ -370,7 +370,7 @@ test_new_move(void)
if((grp_move=H5Gcreate(grp_1, "group_move", 0))<0) goto error;
/* Create hard and soft links. */
- if(H5Glink2(grp_1, "group_move", H5G_LINK_HARD, H5G_SAME_LOC, "hard")<0)
+ if(H5Glink2(grp_1, "group_move", H5G_LINK_HARD, H5G_SAME_LOC, "hard")<0)
goto error;
if(H5Glink2(grp_1, "/group1/group_move", H5G_LINK_SOFT, grp_2, "soft")<0)
goto error;
@@ -387,13 +387,13 @@ test_new_move(void)
if(H5Gmove2(grp_1, "group_move", file_b, "group_new_name")!=FAIL)
goto error;
} H5E_END_TRY;
-
+
/* Move a group across groups in the same file. */
if(H5Gmove2(grp_1, "group_move", grp_2, "group_new_name")<0)
goto error;
/* Open the group just moved to the new location. */
- if((moved_grp = H5Gopen(grp_2, "group_new_name"))<0)
+ if((moved_grp = H5Gopen(grp_2, "group_new_name"))<0)
goto error;
H5Gclose(grp_1);
@@ -1253,7 +1253,7 @@ static int test_create_unlink(const char *msg, hid_t fapl)
char filename[1024];
TESTING(msg);
-
+
/* Create file */
h5_fixname(FILENAME[3], fapl, filename, sizeof filename);
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0)
@@ -1331,7 +1331,7 @@ test_link_slashes(void)
char filename[1024];
TESTING("creating links with multiple slashes");
-
+
/* Create file */
fapl = h5_fileaccess();
h5_fixname(FILENAME[5], fapl, filename, sizeof filename);
@@ -1401,7 +1401,7 @@ test_unlink_slashes(void)
char filename[1024];
TESTING("deleting links with multiple slashes");
-
+
/* Create file */
fapl = h5_fileaccess();
h5_fixname(FILENAME[5], fapl, filename, sizeof filename);
@@ -2017,7 +2017,7 @@ error:
/*-------------------------------------------------------------------------
* Function: test_unlink_chunked_dataset
*
- * Purpose: Tests deleting a chunked dataset
+ * Purpose: Tests deleting a chunked dataset
*
* Return: Success: 0
* Failure: number of errors
@@ -2182,7 +2182,7 @@ main(void)
nerrors += test_resurrect_dataset();
nerrors += test_resurrect_datatype();
nerrors += test_resurrect_group();
-
+
/* Test unlinking chunked datasets */
nerrors += test_unlink_chunked_dataset();
diff --git a/test/vfd.c b/test/vfd.c
index f8e2c3d..b4c863f 100644
--- a/test/vfd.c
+++ b/test/vfd.c
@@ -12,35 +12,35 @@
* access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/*
- * Programmer: Raymond Lu<slu@ncsa.uiuc.edu>
- * Tuesday, Sept 24, 2002
- *
+/*
+ * Programmer: Raymond Lu<slu@ncsa.uiuc.edu>
+ * Tuesday, Sept 24, 2002
+ *
* Purpose: Tests the basic features of Virtual File Drivers
*/
-
+
#include "h5test.h"
#define KB 1024
#define FAMILY_NUMBER 4
#define FAMILY_SIZE (1*KB)
#define FAMILY_SIZE2 (5*KB)
-#define MULTI_SIZE 128
+#define MULTI_SIZE 128
#define CORE_INCREMENT (4*KB)
-const char *FILENAME[] = {
+const char *FILENAME[] = {
"sec2_file",
"core_file",
"family_file",
"multi_file",
- NULL
+ NULL
};
-
+
#define COMPAT_BASENAME "family_v1.6_"
-
+
/*-------------------------------------------------------------------------
- * Function: test_sec2
+ * Function: test_sec2
*
* Purpose: Tests the file handle interface for SEC2 driver
*
@@ -59,16 +59,16 @@ const char *FILENAME[] = {
*
*-------------------------------------------------------------------------
*/
-static herr_t
+static herr_t
test_sec2(void)
{
hid_t file=(-1), fapl, access_fapl = -1;
char filename[1024];
int *fhandle=NULL;
hsize_t file_size;
-
+
TESTING("SEC2 file driver");
-
+
/* Set property list and file name for SEC2 driver. */
fapl = h5_fileaccess();
if(H5Pset_fapl_sec2(fapl)<0)
@@ -96,9 +96,9 @@ test_sec2(void)
if(H5Fget_filesize(file, &file_size) < 0)
goto error;
- /* There is no garantee the size of metadata in file is constant.
+ /* There is no garantee the size of metadata in file is constant.
* Just try to check if it's reasonable. It's 2KB right now.
- */
+ */
if(file_size<1*KB || file_size>4*KB)
goto error;
@@ -107,7 +107,7 @@ test_sec2(void)
h5_cleanup(FILENAME, fapl);
PASSED();
return 0;
-
+
error:
H5E_BEGIN_TRY {
H5Pclose (fapl);
@@ -118,23 +118,23 @@ error:
/*-------------------------------------------------------------------------
- * Function: test_core
- *
+ * Function: test_core
+ *
* Purpose: Tests the file handle interface for CORE driver
- *
+ *
* Return: Success: exit(0)
- *
+ *
* Failure: exit(1)
- *
+ *
* Programmer: Raymond Lu
* Tuesday, Sept 24, 2002
- *
+ *
* Modifications:
*
* Raymond Lu
* Wednesday, June 23, 2004
* Added test for H5Fget_filesize.
- *
+ *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -152,7 +152,7 @@ test_core(void)
if(H5Pset_fapl_core(fapl, CORE_INCREMENT, TRUE)<0)
goto error;
h5_fixname(FILENAME[1], fapl, filename, sizeof filename);
-
+
if((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0)
goto error;
@@ -176,9 +176,9 @@ test_core(void)
if(H5Fget_filesize(file, &file_size) < 0)
goto error;
- /* There is no garantee the size of metadata in file is constant.
- * Just try to check if it's reasonable. Why is this 4KB?
- */
+ /* There is no garantee the size of metadata in file is constant.
+ * Just try to check if it's reasonable. Why is this 4KB?
+ */
if(file_size<2*KB || file_size>6*KB)
goto error;
@@ -187,7 +187,7 @@ test_core(void)
h5_cleanup(FILENAME, fapl);
PASSED();
return 0;
-
+
error:
H5E_BEGIN_TRY {
H5Pclose (fapl);
@@ -221,9 +221,9 @@ test_family_opens(char *fname, hid_t fa_pl)
char wrong_name[1024];
int i;
- /* Case 1: reopen file with 1st member file name and default property list */
+ /* Case 1: reopen file with 1st member file name and default property list */
sprintf(first_name, fname, 0);
-
+
H5E_BEGIN_TRY {
file=H5Fopen(first_name, H5F_ACC_RDWR, H5P_DEFAULT);
} H5E_END_TRY;
@@ -240,7 +240,7 @@ test_family_opens(char *fname, hid_t fa_pl)
H5E_BEGIN_TRY {
file=H5Fopen(fname, H5F_ACC_RDWR, fa_pl);
} H5E_END_TRY;
-
+
/* Case 4: reopen file with wrong name template */
strcpy(wrong_name, fname);
for(i=0; i<1024; i++) {
@@ -283,7 +283,7 @@ error:
*
* Raymond Lu
* June 2, 2005
- * Added a function test_family_opens() to test different
+ * Added a function test_family_opens() to test different
* wrong way to reopen family files.
*
*-------------------------------------------------------------------------
@@ -316,7 +316,7 @@ test_family(void)
if(H5Fclose(file)<0)
goto error;
- /* Test different wrong ways to reopen family files where there's only
+ /* Test different wrong ways to reopen family files where there's only
* one member file existing. */
if(test_family_opens(filename, fapl)<0)
goto error;
@@ -354,7 +354,7 @@ test_family(void)
for(i=0; i<FAMILY_NUMBER; i++)
for(j=0; j<FAMILY_SIZE; j++)
buf[i][j] = i*10000+j;
- if(H5Dwrite(dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf)<0)
+ if(H5Dwrite(dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf)<0)
goto error;
/* check file handle API */
@@ -379,8 +379,8 @@ test_family(void)
if(H5Fget_filesize(file, &file_size) < 0)
goto error;
- /* Some data has been written. The file size should be bigger(18KB+976
- * bytes if int size is 4 bytes) now. */
+ /* Some data has been written. The file size should be bigger(18KB+976
+ * bytes if int size is 4 bytes) now. */
if(sizeof(int)<=4) {
if(file_size<18*KB || file_size>20*KB)
goto error;
@@ -388,7 +388,7 @@ test_family(void)
if(file_size<32*KB || file_size>40*KB)
goto error;
}
-
+
if(H5Sclose(space)<0)
goto error;
if(H5Dclose(dset)<0)
@@ -412,7 +412,7 @@ test_family(void)
if(H5Fclose(file)<0)
goto error;
-
+
h5_cleanup(FILENAME, fapl);
PASSED();
return 0;
@@ -431,7 +431,7 @@ error:
/*-------------------------------------------------------------------------
* Function: test_family_compat
*
- * Purpose: Tests the backward compatibility for FAMILY driver.
+ * Purpose: Tests the backward compatibility for FAMILY driver.
* See if we can open files created with v1.6 library.
* The source file was created by the test/file_handle.c
* of the v1.6 library. Then tools/misc/h5repart.c was
@@ -448,14 +448,14 @@ error:
* Modifications:
*-------------------------------------------------------------------------
*/
-static herr_t
+static herr_t
test_family_compat(void)
{
#ifdef H5_WANT_H5_V1_6_COMPAT
hid_t file=(-1), fapl;
char filename[1024];
char pathname[1024];
- char *srcdir = getenv("srcdir"); /*where the src code is located*/
+ char *srcdir = getenv("srcdir"); /*where the src code is located*/
#endif /*H5_WANT_H5_V1_6_COMPAT*/
TESTING("FAMILY file driver backward compatibility");
@@ -477,7 +477,7 @@ test_family_compat(void)
if(srcdir && ((strlen(srcdir) + strlen(filename) + 1) < sizeof(pathname))) {
strcpy(pathname, srcdir);
strcat(pathname, "/");
- }
+ }
strcat(pathname, filename);
if((file=H5Fopen(pathname, H5F_ACC_RDONLY, fapl))<0)
@@ -524,7 +524,7 @@ test_multi_opens(char *fname, hid_t fa_pl)
char super_name[1024]; /*name string "%%s-s.h5"*/
char sf_name[1024]; /*name string "multi_file-s.h5"*/
- /* Case: reopen with the name of super file and default property list */
+ /* Case: reopen with the name of super file and default property list */
sprintf(super_name, "%%s-%c.h5", 's');
sprintf(sf_name, super_name, fname);
@@ -553,7 +553,7 @@ test_multi_opens(char *fname, hid_t fa_pl)
* Raymond Lu
* Wednesday, June 23, 2004
* Added test for H5Fget_filesize.
- *
+ *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -593,7 +593,7 @@ test_multi(void)
memb_name[H5FD_MEM_SUPER] = sv[H5FD_MEM_SUPER];
memb_addr[H5FD_MEM_SUPER] = 0;
- memb_fapl[H5FD_MEM_DRAW] = H5P_DEFAULT;
+ memb_fapl[H5FD_MEM_DRAW] = H5P_DEFAULT;
sprintf(sv[H5FD_MEM_DRAW], "%%s-%c.h5", 'r');
memb_name[H5FD_MEM_DRAW] = sv[H5FD_MEM_DRAW];
memb_addr[H5FD_MEM_DRAW] = HADDR_MAX/2;
@@ -605,9 +605,9 @@ test_multi(void)
if((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0)
goto error;
- if(H5Fclose(file)<0)
+ if(H5Fclose(file)<0)
goto error;
-
+
/* Test wrong ways to reopen multi files */
if(test_multi_opens(filename, fapl)<0)
goto error;
@@ -635,13 +635,13 @@ test_multi(void)
/* Before any data is written, the raw data file is empty. So
* the file size is only the size of metadata file. It's supposed
* to be 2KB.
- */
+ */
if(file_size<1*KB || file_size>4*KB)
goto error;
if((dset=H5Dcreate(file, dname, H5T_NATIVE_INT, space, H5P_DEFAULT))<0)
goto error;
-
+
for(i=0; i<MULTI_SIZE; i++)
for(j=0; j<MULTI_SIZE; j++)
buf[i][j] = i*10000+j;
@@ -668,9 +668,9 @@ test_multi(void)
if(H5Fget_filesize(file, &file_size) < 0)
goto error;
- /* After the data is written, the file size is huge because the
+ /* After the data is written, the file size is huge because the
* beginning of raw data file is set at HADDR_MAX/2. It's supposed
- * to be (HADDR_MAX/2 + 128*128*4)
+ * to be (HADDR_MAX/2 + 128*128*4)
*/
if(file_size < HADDR_MAX/2 || file_size > HADDR_MAX)
goto error;
@@ -681,48 +681,48 @@ test_multi(void)
goto error;
if(H5Pclose(fapl2)<0)
goto error;
- if(H5Fclose(file)<0)
- goto error;
+ if(H5Fclose(file)<0)
+ goto error;
+
+ h5_cleanup(FILENAME, fapl);
+ PASSED();
- h5_cleanup(FILENAME, fapl);
- PASSED();
+ return 0;
- return 0;
-
-error:
- H5E_BEGIN_TRY {
+error:
+ H5E_BEGIN_TRY {
H5Sclose(space);
H5Dclose(dset);
H5Pclose(fapl);
H5Pclose(fapl2);
- H5Fclose(file);
- } H5E_END_TRY;
- return -1;
+ H5Fclose(file);
+ } H5E_END_TRY;
+ return -1;
}
/*-------------------------------------------------------------------------
* Function: main
- *
+ *
* Purpose: Tests the basic features of Virtual File Drivers
- *
+ *
* Return: Success: exit(0)
- *
+ *
* Failure: exit(1)
- *
+ *
* Programmer: Raymond Lu
* Tuesday, Sept 24, 2002
- *
+ *
* Modifications:
*
*-------------------------------------------------------------------------
*/
int
main(void)
-{
+{
int nerrors=0;
-
- h5_reset();
+
+ h5_reset();
nerrors += test_sec2()<0 ?1:0;
nerrors += test_core()<0 ?1:0;