summaryrefslogtreecommitdiffstats
path: root/test/bittests.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2001-08-15 14:54:05 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2001-08-15 14:54:05 (GMT)
commit81cde8e325d01f68a02837429fec7ffb961e3d5a (patch)
treee3355629c3bde3e6b02623c37a9fb6ee6123f13e /test/bittests.c
parent44b651ac6cc7d20abfb88cfeb833578d0224bb04 (diff)
downloadhdf5-81cde8e325d01f68a02837429fec7ffb961e3d5a.zip
hdf5-81cde8e325d01f68a02837429fec7ffb961e3d5a.tar.gz
hdf5-81cde8e325d01f68a02837429fec7ffb961e3d5a.tar.bz2
[svn-r4360] 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). (Merged from the same changes to development branch) Solution: Changed the uintn & intn's to unsigned and int's respectively. Platforms tested: FreeBSD 4.4 (hawkwind)
Diffstat (limited to 'test/bittests.c')
-rw-r--r--test/bittests.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/test/bittests.c b/test/bittests.c
index 3469e2d..a5af191 100644
--- a/test/bittests.c
+++ b/test/bittests.c
@@ -37,7 +37,7 @@ static herr_t
test_find (void)
{
uint8_t v1[8];
- intn i;
+ int i;
ssize_t n;
TESTING("bit search operations");
@@ -157,7 +157,7 @@ test_copy (void)
{
uint8_t v1[8], v2[8];
size_t s_offset, d_offset, size;
- intn i, j;
+ int i, j;
ssize_t n;
TESTING("bit copy operations");
@@ -172,13 +172,13 @@ test_copy (void)
/* Copy some bits to v2 and make sure something was copied */
H5T_bit_copy (v2, d_offset, v1, s_offset, size);
- for (j=0; j<(intn)sizeof(v2); j++) if (v2[j]) break;
- if (size>0 && j>=(intn)sizeof(v2)) {
+ for (j=0; j<(int)sizeof(v2); j++) if (v2[j]) break;
+ if (size>0 && j>=(int)sizeof(v2)) {
H5_FAILED();
puts (" Unabled to find copied region in destination");
goto failed;
}
- if (0==size && j<(intn)sizeof(v2)) {
+ if (0==size && j<(int)sizeof(v2)) {
H5_FAILED();
puts (" Found copied bits when we shouldn't have");
goto failed;
@@ -279,7 +279,7 @@ test_set (void)
{
uint8_t v2[8];
size_t d_offset, size;
- intn i, j;
+ int i, j;
ssize_t n;
TESTING("bit set operations");
@@ -292,13 +292,13 @@ test_set (void)
/* Set some bits in v2 */
H5T_bit_set (v2, d_offset, size, TRUE);
- for (j=0; j<(intn)sizeof(v2); j++) if (v2[j]) break;
- if (size>0 && j>=(intn)sizeof(v2)) {
+ for (j=0; j<(int)sizeof(v2); j++) if (v2[j]) break;
+ if (size>0 && j>=(int)sizeof(v2)) {
H5_FAILED();
puts (" Unabled to find set region in buffer");
goto failed;
}
- if (0==size && j<(intn)sizeof(v2)) {
+ if (0==size && j<(int)sizeof(v2)) {
H5_FAILED();
puts (" Found set bits when we shouldn't have");
goto failed;
@@ -396,7 +396,7 @@ test_clear (void)
{
uint8_t v2[8];
size_t d_offset, size;
- intn i, j;
+ int i, j;
ssize_t n;
TESTING("bit clear operations");
@@ -409,13 +409,13 @@ test_clear (void)
/* Clear some bits in v2 */
H5T_bit_set (v2, d_offset, size, FALSE);
- for (j=0; j<(intn)sizeof(v2); j++) if (0xff!=v2[j]) break;
- if (size>0 && j>=(intn)sizeof(v2)) {
+ for (j=0; j<(int)sizeof(v2); j++) if (0xff!=v2[j]) break;
+ if (size>0 && j>=(int)sizeof(v2)) {
H5_FAILED();
puts (" Unabled to find cleared region in buffer");
goto failed;
}
- if (0==size && j<(intn)sizeof(v2)) {
+ if (0==size && j<(int)sizeof(v2)) {
H5_FAILED();
puts (" Found cleared bits when we shouldn't have");
goto failed;
@@ -511,7 +511,7 @@ test_clear (void)
int
main (void)
{
- intn nerrors=0;
+ int nerrors=0;
nerrors += test_find ()<0?1:0;
nerrors += test_set ()<0?1:0;