Improve doxygen documentation.
This commit is contained in:
+10
-7
@@ -13,19 +13,22 @@ typedef unsigned long uc_bv_integer;
|
||||
struct UCBitVec {
|
||||
//storage for the bits
|
||||
uc_bv_integer *vec;
|
||||
//length in bytes of the above vec.
|
||||
//number of elements int the above vec.
|
||||
size_t vec_len;
|
||||
};
|
||||
|
||||
/**
|
||||
* Evaluates the length required for a bitvec to store nbit bits.
|
||||
* Evaluates the number of uc_bv_integer elements required for a bitvec to store nbit bits.
|
||||
*/
|
||||
#define UC_BV_LEN(nbits) ((nbits/(sizeof(uc_bv_integer)*CHAR_BIT)) + (nbits % (sizeof(uc_bv_integer)*CHAR_BIT) == 0 ? 0 : 1))
|
||||
|
||||
/**
|
||||
* Use as :
|
||||
/** Initialize a bitvec with predefined backing array.
|
||||
* The backing array element type must be uc_bv_integer
|
||||
* Use as
|
||||
* @code
|
||||
* uc_bv_integer v[10];
|
||||
* struct UCBitVec v = BITVEC_STATIC_INIT(v);
|
||||
* @endcode
|
||||
*/
|
||||
#define UC_BV_STATIC_INIT(vec_data)\
|
||||
{\
|
||||
@@ -47,13 +50,13 @@ void uc_bv_free(struct UCBitVec *v);
|
||||
//Note that accessing a bit beyond the nbits originally initialized
|
||||
//for the given bitvec is undedefined
|
||||
|
||||
/** Sets bit no. b */
|
||||
/** Sets bit number b */
|
||||
void uc_bv_set_bit(struct UCBitVec *v,int b);
|
||||
|
||||
/** Clears bit no. b*/
|
||||
/** Clears bit number b*/
|
||||
void uc_bv_clr_bit(struct UCBitVec *v,int b);
|
||||
|
||||
/** Gets the current value (0 or 1) of bit no. b*/
|
||||
/** Gets the current value (0 or 1) of bit number @b*/
|
||||
int uc_bv_get_bit(const struct UCBitVec *v,int b);
|
||||
|
||||
/** Sets all bits to zero */
|
||||
|
||||
Reference in New Issue
Block a user