summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5Aint.c3
-rw-r--r--test/set_extent.c35
2 files changed, 22 insertions, 16 deletions
diff --git a/src/H5Aint.c b/src/H5Aint.c
index fd1e3cd..9dd40ec 100644
--- a/src/H5Aint.c
+++ b/src/H5Aint.c
@@ -80,6 +80,9 @@ static herr_t H5A_compact_build_table_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/,
unsigned sequence, unsigned *oh_flags_ptr, void *_udata/*in,out*/);
static herr_t H5A_dense_build_table_cb(const H5A_t *attr, void *_udata);
static int H5A_attr_cmp_name_inc(const void *attr1, const void *attr2);
+static int H5A_attr_cmp_name_dec(const void *attr1, const void *attr2);
+static int H5A_attr_cmp_corder_inc(const void *attr1, const void *attr2);
+static int H5A_attr_cmp_corder_dec(const void *attr1, const void *attr2);
static herr_t H5A_attr_sort_table(H5A_attr_table_t *atable, H5_index_t idx_type,
H5_iter_order_t order);
diff --git a/test/set_extent.c b/test/set_extent.c
index 319811d..c4c3ed0 100644
--- a/test/set_extent.c
+++ b/test/set_extent.c
@@ -123,27 +123,28 @@ int main( void )
for( i = 0; i < (int)dims_out[0]; i++ )
for( j = 0; j < (int)dims_out[1]; j++ )
if ( buf1[i][j] != data[i][j] ) {
- printf("buf1[%d][%d]=%d\n",i,j,buf1[i][j]);
- printf("data[%d][%d]=%d\n",i,j,data[i][j]);
+ printf("buf1[%d][%d] = %d\n", i, j, buf1[i][j]);
+ printf("data[%d][%d] = %d\n", i, j, data[i][j]);
TEST_ERROR;
} /* end if */
/*-------------------------------------------------------------------------
- * Set new dimensions for the array; expand it again
+ * Set new dimensions for the array; expand it back to original size
*-------------------------------------------------------------------------
*/
/* Set new dimensions for the array. */
- if (H5Dset_extent( dataset_id , dims )<0) TEST_ERROR;
+ if(H5Dset_extent(dataset_id, dims) < 0) TEST_ERROR;
/* Get the space. */
- if ((space_id = H5Dget_space( dataset_id ))<0) TEST_ERROR;
+ if((space_id = H5Dget_space(dataset_id)) < 0) TEST_ERROR;
/* Get dimensions. */
- if (H5Sget_simple_extent_dims( space_id, dims_out, NULL )<0) TEST_ERROR;
+ if(H5Sget_simple_extent_dims(space_id, dims_out, NULL) < 0) TEST_ERROR;
- if ( dims_out[0] != dims[0] ) TEST_ERROR;
+ if(dims_out[0] != dims[0]) TEST_ERROR;
+ if(dims_out[1] != dims[1]) TEST_ERROR;
/*-------------------------------------------------------------------------
@@ -152,19 +153,21 @@ int main( void )
*/
/* Read the new dataset. */
- if (H5Dread( dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2 )<0) TEST_ERROR;
+ if(H5Dread(dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2) < 0) TEST_ERROR;
/* Compare the read array with the original array */
- for( i = 0; i < (int)dims_out[0]; i++ ) {
- for( j = 0; j < (int)dims_out[1]; j++ ) {
- if ( i >= 70 || j >= 70 ) {
- if ( buf2[i][j] != fillvalue ) TEST_ERROR;
- }
+ for(i = 0; i < (int)dims_out[0]; i++ )
+ for(j = 0; j < (int)dims_out[1]; j++ )
+ if(i >= 70 || j >= 70) {
+ if(buf2[i][j] != fillvalue) {
+ printf("buf1[%d][%d] = %d\n", i, j, buf1[i][j]);
+ printf("fillvalue = %d\n", fillvalue);
+ TEST_ERROR;
+ } /* end if */
+ } /* end if */
else {
- if ( buf2[i][j] != data[i][j] ) TEST_ERROR;
+ if(buf2[i][j] != data[i][j]) TEST_ERROR;
}
- }
- }
/*-------------------------------------------------------------------------