Add uc_bv_find_first_zero

This commit is contained in:
Nils O. Selåsdal
2025-07-20 21:44:11 +02:00
parent 5b5ca445e9
commit 7408c48dff
3 changed files with 51 additions and 1 deletions
+6 -1
View File
@@ -68,11 +68,16 @@ void uc_bv_set_all(struct UCBitVec *v);
/** Initialize bits from a array of ints, each array element maps to one bit.
* The bits are initialized from the int array so zero maps to zero and non-zero maps to one.
* e..g to set the 5 first bits, to 01110:
* int a[] = {0,1,1,1,0};
* int a[] = {0,1,1,1,0};
* set_bits_from_array(v,a,5);
* */
void uc_bv_set_bits_from_array(struct UCBitVec *v,const char *array,size_t array_len);
/** Find the index of the first zero bit in the bitvec.
* @param v The bitvec to search
* @return The index of the first zero bit, or -1 if all bits are set
*/
int uc_bv_find_first_zero(const struct UCBitVec *v);
#ifdef __cplusplus
}