summaryrefslogtreecommitdiffstats
path: root/test/trefer.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2001-08-14 22:09:56 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2001-08-14 22:09:56 (GMT)
commite87fc517b8fc391cf18c268ce0b195eb7398a4a7 (patch)
tree494d1d87f71f87f320707989b7f12eec0f1d3805 /test/trefer.c
parenteef2829d1655e42225b2400c6e3d123be26e08a8 (diff)
downloadhdf5-e87fc517b8fc391cf18c268ce0b195eb7398a4a7.zip
hdf5-e87fc517b8fc391cf18c268ce0b195eb7398a4a7.tar.gz
hdf5-e87fc517b8fc391cf18c268ce0b195eb7398a4a7.tar.bz2
[svn-r4355] Purpose:
Code cleanup (sorta) Description: When the first versions of the HDF5 library were designed, I remembered vividly the difficulties of porting code from a 32-bit platform to a 16-bit platform and asked that people use intn & uintn instead of int & unsigned int, respectively. However, in hindsight, this was overkill and unnecessary since we weren't going to be porting the HDF5 library to 16-bit architectures. Currently, the extra uintn & intn typedefs are causing problems for users who'd like to include both the HDF5 and HDF4 header files in one source module (like Kent's h4toh5 library). Solution: Changed the uintn & intn's to unsigned and int's respectively. Platforms tested: FreeBSD 4.4 (hawkwind)
Diffstat (limited to 'test/trefer.c')
-rw-r--r--test/trefer.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/trefer.c b/test/trefer.c
index f48f4f8..340ef0c 100644
--- a/test/trefer.c
+++ b/test/trefer.c
@@ -69,8 +69,8 @@ test_reference_obj(void)
hobj_ref_t *wbuf, /* buffer to write to disk */
*rbuf, /* buffer read from disk */
*tbuf; /* temp. buffer read from disk */
- uintn *tu32; /* Temporary pointer to uint32 data */
- intn i; /* counting variables */
+ unsigned *tu32; /* Temporary pointer to uint32 data */
+ int i; /* counting variables */
const char *write_comment="Foo!"; /* Comments for group */
char read_comment[10];
herr_t ret; /* Generic return value */
@@ -79,9 +79,9 @@ test_reference_obj(void)
MESSAGE(5, ("Testing Object Reference Functions\n"));
/* Allocate write & read buffers */
- wbuf=malloc(MAX(sizeof(uintn),sizeof(hobj_ref_t))*SPACE1_DIM1);
- rbuf=malloc(MAX(sizeof(uintn),sizeof(hobj_ref_t))*SPACE1_DIM1);
- tbuf=malloc(MAX(sizeof(uintn),sizeof(hobj_ref_t))*SPACE1_DIM1);
+ wbuf=malloc(MAX(sizeof(unsigned),sizeof(hobj_ref_t))*SPACE1_DIM1);
+ rbuf=malloc(MAX(sizeof(unsigned),sizeof(hobj_ref_t))*SPACE1_DIM1);
+ tbuf=malloc(MAX(sizeof(unsigned),sizeof(hobj_ref_t))*SPACE1_DIM1);
/* Create file */
fid1 = H5Fcreate(FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -103,7 +103,7 @@ test_reference_obj(void)
dataset=H5Dcreate(group,"Dataset1",H5T_NATIVE_UINT,sid1,H5P_DEFAULT);
CHECK(dataset, FAIL, "H5Dcreate");
- for(tu32=(uintn *)wbuf,i=0; i<SPACE1_DIM1; i++)
+ for(tu32=(unsigned *)wbuf,i=0; i<SPACE1_DIM1; i++)
*tu32++=i*3;
/* Write selection to disk */
@@ -219,7 +219,7 @@ test_reference_obj(void)
ret=H5Dread(dset2,H5T_NATIVE_UINT,H5S_ALL,H5S_ALL,H5P_DEFAULT,tbuf);
CHECK(ret, FAIL, "H5Dread");
- for(tu32=(uintn *)tbuf,i=0; i<SPACE1_DIM1; i++,tu32++)
+ for(tu32=(unsigned *)tbuf,i=0; i<SPACE1_DIM1; i++,tu32++)
VERIFY(*tu32, (uint32_t)(i*3), "Data");
/* Close dereferenced Dataset */
@@ -306,7 +306,7 @@ test_reference_region(void)
uint8_t *dwbuf, /* Buffer for writing numeric data to disk */
*drbuf; /* Buffer for reading numeric data from disk */
uint8_t *tu8; /* Temporary pointer to uint8 data */
- intn i; /* counting variables */
+ int i; /* counting variables */
herr_t ret; /* Generic return value */
/* Output message about test being performed */