summaryrefslogtreecommitdiffstats
path: root/src/H5Tbit.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2004-03-13 17:39:41 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2004-03-13 17:39:41 (GMT)
commit95dc09ab4b7d20f971cc26a91dbf2df46f71bb96 (patch)
treecd5bfd0ab985801566fad6c3e1a26c82af08c37d /src/H5Tbit.c
parentf0ac5a6420d53f3c2ce4a322f3d6e36902b67b42 (diff)
downloadhdf5-95dc09ab4b7d20f971cc26a91dbf2df46f71bb96.zip
hdf5-95dc09ab4b7d20f971cc26a91dbf2df46f71bb96.tar.gz
hdf5-95dc09ab4b7d20f971cc26a91dbf2df46f71bb96.tar.bz2
[svn-r8259] *** empty log message ***
Diffstat (limited to 'src/H5Tbit.c')
-rw-r--r--src/H5Tbit.c29
1 files changed, 22 insertions, 7 deletions
diff --git a/src/H5Tbit.c b/src/H5Tbit.c
index ef62f31..f3fbc3d 100644
--- a/src/H5Tbit.c
+++ b/src/H5Tbit.c
@@ -166,7 +166,8 @@ H5T_bit_copy (uint8_t *dst, size_t dst_offset, const uint8_t *src,
*
* Purpose: Simulation of hardware shifting. Shifts a bit vector
* in a way similar to shifting a variable value, like
- * value <<= 3, or value >>= 16.
+ * value <<= 3, or value >>= 16. SHIFT_DIST is positive for
+ * left shift, negative for right shift.
*
* Return: void
*
@@ -175,6 +176,9 @@ H5T_bit_copy (uint8_t *dst, size_t dst_offset, const uint8_t *src,
*
* Modifications:
*
+ * Can generalize it to handle a bit vector of any START
+ * position and any SIZE.
+ *
*-------------------------------------------------------------------------
*/
void
@@ -219,7 +223,8 @@ done:
/*-------------------------------------------------------------------------
* Function: H5T_bit_get_d
*
- * Purpose: Return a small bit sequence as a number.
+ * Purpose: Return a small bit sequence as a number. Bit vector starts
+ * at OFFSET and is SIZE bits long.
*
* Return: Success: The bit sequence interpretted as an unsigned
* integer.
@@ -369,7 +374,9 @@ H5T_bit_set (uint8_t *buf, size_t offset, size_t size, hbool_t value)
* Purpose: Finds the first bit with the specified VALUE within a region
* of a bit vector. The region begins at OFFSET and continues
* for SIZE bits, but the region can be searched from the least
- * significat end toward the most significant end with
+ * significat end toward the most significant end(H5T_BIT_MSB
+ * as DIRECTION), or from the most significant end to the least
+ * significant end(H5T_BIT_LSB as DIRECTION).
*
* Return: Success: The position of the bit found, relative to
* the offset.
@@ -473,7 +480,8 @@ done:
/*-------------------------------------------------------------------------
* Function: H5T_bit_inc
*
- * Purpose: Increment part of a bit field by adding 1.
+ * Purpose: Increment part of a bit field by adding 1. The bit field
+ * starts with bit position START and is SIZE bits long.
*
* Return: Success: The carry-out value, one if overflow zero
* otherwise.
@@ -542,8 +550,8 @@ H5T_bit_inc(uint8_t *buf, size_t start, size_t size)
* Function: H5T_bit_dec
*
* Purpose: decrement part of a bit field by 1.
- * At this moment, START is always 0 and the algorithm only
- * works from the end to the front for the buffer.
+ * At this moment, START is always 0 and SIZE is a multiply
+ * of 8(in bit). This is different from H5T_bit_inc.
*
* Return: void
*
@@ -553,6 +561,9 @@ H5T_bit_inc(uint8_t *buf, size_t start, size_t size)
*
* Modifications:
*
+ * Need to generalize it to handle random START and SIZE like
+ * H5T_bit_inc.
+ *
*-------------------------------------------------------------------------
*/
void
@@ -579,7 +590,8 @@ H5T_bit_dec(uint8_t *buf, size_t start, size_t size)
* Function: H5T_bit_neg
*
* Purpose: Bit-negate buffer.
- * At this moment, START is always 0.
+ * At this moment, START is always 0 and SIZE is always a
+ * multiply of 8 (in bit).
*
* Return: void
*
@@ -588,6 +600,9 @@ H5T_bit_dec(uint8_t *buf, size_t start, size_t size)
*
* Modifications:
*
+ * Need to generalize it to handle rand START and SIZE like
+ * H5T_bit_inc.
+ *
*-------------------------------------------------------------------------
*/
void