summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorElena Pourmal <epourmal@hdfgroup.org>1998-09-01 15:07:02 (GMT)
committerElena Pourmal <epourmal@hdfgroup.org>1998-09-01 15:07:02 (GMT)
commit94a9576ee7bf5ea5db73984d492378822f6c684f (patch)
treea9546b708e42f416da2abbb3565cca081914d6b8 /examples
parent697b9c5ad0a76333dc1cf5ee03aff1c350a4e887 (diff)
downloadhdf5-94a9576ee7bf5ea5db73984d492378822f6c684f.zip
hdf5-94a9576ee7bf5ea5db73984d492378822f6c684f.tar.gz
hdf5-94a9576ee7bf5ea5db73984d492378822f6c684f.tar.bz2
[svn-r645] ./examples/h5_attribute.c
./examples/h5_select.c Cosmetic changes to the source format ./examples/h5_chunk_read.c ./examples/h5_read.c Third argument in the H5select_hyperslab function had wrong datatype. Fixed.
Diffstat (limited to 'examples')
-rw-r--r--examples/h5_attribute.c5
-rw-r--r--examples/h5_chunk_read.c2
-rw-r--r--examples/h5_read.c4
-rw-r--r--examples/h5_select.c4
4 files changed, 10 insertions, 5 deletions
diff --git a/examples/h5_attribute.c b/examples/h5_attribute.c
index ed41e56..904c1df 100644
--- a/examples/h5_attribute.c
+++ b/examples/h5_attribute.c
@@ -27,7 +27,8 @@
herr_t attr_info(hid_t loc_id, const char *name, void *opdata);
/* Operator function */
-int main (void)
+int
+main (void)
{
hid_t file, dataset; /* File and dataset identifiers */
@@ -189,6 +190,7 @@ idx = H5Aiterate(dataset, NULL, attr_info, NULL);
*/
H5Dclose(dataset);
H5Fclose(file);
+
return 0;
}
@@ -256,5 +258,6 @@ herr_t attr_info(hid_t loc_id, const char *name, void *opdata)
H5Tclose(atype);
H5Sclose(aspace);
H5Aclose(attr);
+
return 0;
}
diff --git a/examples/h5_chunk_read.c b/examples/h5_chunk_read.c
index 0c5d03c..f495f7b 100644
--- a/examples/h5_chunk_read.c
+++ b/examples/h5_chunk_read.c
@@ -24,7 +24,7 @@ main (void)
hsize_t chunk_dims[2];
hsize_t col_dims[1];
hsize_t count[2];
- hsize_t offset[2];
+ hssize_t offset[2];
herr_t status, status_n;
diff --git a/examples/h5_read.c b/examples/h5_read.c
index fb221ab..c5b675f 100644
--- a/examples/h5_read.c
+++ b/examples/h5_read.c
@@ -36,9 +36,9 @@ main (void)
int data_out[NX][NY][NZ ]; /* output buffer */
hsize_t count[2]; /* size of the hyperslab in the file */
- hsize_t offset[2]; /* hyperslab offset in the file */
+ hssize_t offset[2]; /* hyperslab offset in the file */
hsize_t count_out[3]; /* size of the hyperslab in memory */
- hsize_t offset_out[3]; /* hyperslab offset in memory */
+ hssize_t offset_out[3]; /* hyperslab offset in memory */
int i, j, k, status_n, rank;
for (j = 0; j < NX; j++) {
diff --git a/examples/h5_select.c b/examples/h5_select.c
index 4de93e0..1ad3c04 100644
--- a/examples/h5_select.c
+++ b/examples/h5_select.c
@@ -31,7 +31,8 @@
#define NPOINTS 4 /* Number of points that will be selected
and overwritten */
-int main (void)
+int
+main (void)
{
hid_t file, dataset; /* File and dataset identifiers */
@@ -200,5 +201,6 @@ for (i=0; i < MSPACE_DIM1; i++) {
for(j=0; j < MSPACE_DIM2; j++) printf("%3d ", matrix[i][j]);
printf("\n");
}
+
return 0;
}