diff options
Diffstat (limited to 'examples/h5_select.c')
-rw-r--r-- | examples/h5_select.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/examples/h5_select.c b/examples/h5_select.c index d39458f..dc08b8a 100644 --- a/examples/h5_select.c +++ b/examples/h5_select.c @@ -87,7 +87,8 @@ main (void) * Buffers' initialization. */ vector[0] = vector[MSPACE1_DIM - 1] = -1; - for (i = 1; i < MSPACE1_DIM - 1; i++) vector[i] = i; + for(i = 1; i < MSPACE1_DIM - 1; i++) + vector[i] = i; /* * Create a file. @@ -109,7 +110,7 @@ main (void) * Create dataset in the file. Notice that creation * property list plist is used. */ - dataset = H5Dcreate(file, "Matrix in file", H5T_NATIVE_INT, fid, plist); + dataset = H5Dcreate2(file, "Matrix in file", H5T_NATIVE_INT, fid, H5P_DEFAULT, plist, H5P_DEFAULT); /* * Select hyperslab for the dataset in the file, using 3x2 blocks, @@ -302,8 +303,9 @@ main (void) * 0 0 0 0 0 0 0 0 0 * 0 0 0 0 0 0 0 0 0 */ - for (i=0; i < MSPACE_DIM1; i++) { - for(j=0; j < MSPACE_DIM2; j++) printf("%3d ", matrix_out[i][j]); + for(i = 0; i < MSPACE_DIM1; i++) { + for(j = 0; j < MSPACE_DIM2; j++) + printf("%3d ", matrix_out[i][j]); printf("\n"); } @@ -330,3 +332,4 @@ main (void) return 0; } + |