summaryrefslogtreecommitdiffstats
path: root/src/H5Tbit.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>1998-10-26 22:44:13 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>1998-10-26 22:44:13 (GMT)
commit7dcbae97f23f8409ed8d60640b3b2a8aaed70978 (patch)
tree54ba54ec5cdcda9651d63a4471a9a9ec2204e767 /src/H5Tbit.c
parenta7b166727dce2c23c2a0c7805c3e3b8d38e4be2d (diff)
downloadhdf5-7dcbae97f23f8409ed8d60640b3b2a8aaed70978.zip
hdf5-7dcbae97f23f8409ed8d60640b3b2a8aaed70978.tar.gz
hdf5-7dcbae97f23f8409ed8d60640b3b2a8aaed70978.tar.bz2
[svn-r800] Made a "htri_t" as a return value from "boolean" functions returning
TRUE/FALSE/FAIL, hbool_t is now strictly for true boolean values.
Diffstat (limited to 'src/H5Tbit.c')
-rw-r--r--src/H5Tbit.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/H5Tbit.c b/src/H5Tbit.c
index 8b0b53b..74db048 100644
--- a/src/H5Tbit.c
+++ b/src/H5Tbit.c
@@ -328,7 +328,7 @@ H5T_bit_find (uint8 *buf, size_t offset, size_t size, H5T_sdir_t direction,
/* Beginning */
if (offset) {
for (i=offset; i<8 && size>0; i++, size--) {
- if (value==((buf[idx]>>i) & 0x01)) {
+ if (value==(hbool_t)((buf[idx]>>i) & 0x01)) {
return 8*idx+i - base;
}
}
@@ -339,7 +339,7 @@ H5T_bit_find (uint8 *buf, size_t offset, size_t size, H5T_sdir_t direction,
while (size>=8) {
if ((value?0x00:0xff)!=buf[idx]) {
for (i=0; i<8; i++) {
- if (value==((buf[idx]>>i) & 0x01)) {
+ if (value==(hbool_t)((buf[idx]>>i) & 0x01)) {
return 8*idx+i - base;
}
}
@@ -349,7 +349,7 @@ H5T_bit_find (uint8 *buf, size_t offset, size_t size, H5T_sdir_t direction,
}
/* End */
for (i=0; i<(ssize_t)size; i++) {
- if (value==((buf[idx]>>i) & 0x01)) {
+ if (value==(hbool_t)((buf[idx]>>i) & 0x01)) {
return 8*idx+i - base;
}
}
@@ -363,7 +363,7 @@ H5T_bit_find (uint8 *buf, size_t offset, size_t size, H5T_sdir_t direction,
/* Beginning */
if (size>8-offset && (offset+size)%8) {
for (i=(offset+size)%8-1; i>=0; --i, --size) {
- if (value==((buf[idx]>>i) & 0x01)) {
+ if (value==(hbool_t)((buf[idx]>>i) & 0x01)) {
return 8*idx+i - base;
}
}
@@ -373,7 +373,7 @@ H5T_bit_find (uint8 *buf, size_t offset, size_t size, H5T_sdir_t direction,
while (size>=8) {
if ((value?0x00:0xff)!=buf[idx]) {
for (i=7; i>=0; --i) {
- if (value==((buf[idx]>>i) & 0x01)) {
+ if (value==(hbool_t)((buf[idx]>>i) & 0x01)) {
return 8*idx+i - base;
}
}
@@ -384,7 +384,7 @@ H5T_bit_find (uint8 *buf, size_t offset, size_t size, H5T_sdir_t direction,
/* End */
if (size>0) {
for (i=offset+size-1; i>=(ssize_t)offset; --i) {
- if (value==((buf[idx]>>i) & 0x01)) {
+ if (value==(hbool_t)((buf[idx]>>i) & 0x01)) {
return 8*idx+i - base;
}
}
@@ -414,7 +414,7 @@ H5T_bit_find (uint8 *buf, size_t offset, size_t size, H5T_sdir_t direction,
*
*-------------------------------------------------------------------------
*/
-hbool_t
+htri_t
H5T_bit_inc(uint8 *buf, size_t start, size_t size)
{
size_t idx = start / 8;