diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-03-27 03:06:48 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-03-27 03:06:48 (GMT) |
commit | c64ac252cdd9fe40b96313e2435551f16428b9d6 (patch) | |
tree | 9ff6633ac3ee8fe9529620a0ecfc99bbbab451f8 /hl/examples | |
parent | ddf436469153cc5deb7cadfdb9a1b985c605774f (diff) | |
download | hdf5-c64ac252cdd9fe40b96313e2435551f16428b9d6.zip hdf5-c64ac252cdd9fe40b96313e2435551f16428b9d6.tar.gz hdf5-c64ac252cdd9fe40b96313e2435551f16428b9d6.tar.bz2 |
[svn-r13549] Description:
Check in changes from Elena and I to get pgcc compiler working again.
Primarily (all?) changes to move from using 'hsize_t' as array index to using
something else ('size_t') mostly.
Tested on:
Linux/32 2.4 kagiso w/pgcc
Diffstat (limited to 'hl/examples')
-rw-r--r-- | hl/examples/ex_image1.c | 8 | ||||
-rw-r--r-- | hl/examples/ex_lite2.c | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/hl/examples/ex_image1.c b/hl/examples/ex_image1.c index 9b3c426..96bc7c7 100644 --- a/hl/examples/ex_image1.c +++ b/hl/examples/ex_image1.c @@ -16,8 +16,8 @@ #include "hdf5.h" #include "hdf5_hl.h" -#define WIDTH (hsize_t)400 -#define HEIGHT (hsize_t)200 +#define WIDTH 400 +#define HEIGHT 200 #define PAL_ENTRIES 9 unsigned char buf [ WIDTH*HEIGHT ]; @@ -26,7 +26,7 @@ int main( void ) hid_t file_id; herr_t status; hsize_t pal_dims[] = {PAL_ENTRIES,3}; - hsize_t i, j; + size_t i, j; int n, space; unsigned char pal[PAL_ENTRIES*3] = { /* create a palette with 9 colors */ 0,0,168, /* dark blue */ @@ -56,7 +56,7 @@ int main( void ) file_id = H5Fcreate( "ex_image1.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT ); /* make the image */ - status = H5IMmake_image_8bit( file_id, "image1", WIDTH, HEIGHT, buf ); + status = H5IMmake_image_8bit( file_id, "image1", (hsize_t)WIDTH, (hsize_t)HEIGHT, buf ); /* make a palette */ status = H5IMmake_palette( file_id, "pallete", pal_dims, pal ); diff --git a/hl/examples/ex_lite2.c b/hl/examples/ex_lite2.c index 5919ef9..98f92c8 100644 --- a/hl/examples/ex_lite2.c +++ b/hl/examples/ex_lite2.c @@ -22,7 +22,7 @@ int main( void ) int data[6]; hsize_t dims[2]; herr_t status; - hsize_t i, j, nrow, n_values; + size_t i, j, nrow, n_values; /* open file from ex_lite1.c */ file_id = H5Fopen ("ex_lite1.h5", H5F_ACC_RDONLY, H5P_DEFAULT); @@ -34,8 +34,8 @@ int main( void ) status = H5LTget_dataset_info(file_id,"/dset",dims,NULL,NULL); /* print it by rows */ - n_values = dims[0] * dims[1]; - nrow = dims[1]; + n_values = (size_t)(dims[0] * dims[1]); + nrow = (size_t)dims[1]; for (i=0; i<n_values/nrow; i++ ) { for (j=0; j<nrow; j++) |