-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add bit array check and set * update changelog
- Loading branch information
Showing
4 changed files
with
58 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
*** Author: Tyler Barrus | ||
*** email: [email protected] | ||
*** | ||
*** Version: 0.1.1 | ||
*** Version: 0.1.2 | ||
*** Purpose: Simple bit array library | ||
*** | ||
*** License: MIT 2019 | ||
|
@@ -56,6 +56,10 @@ int ba_set_bit(bitarray_t ba, size_t bit); | |
BIT_NOT_SET if false */ | ||
int ba_check_bit(bitarray_t ba, size_t bit); | ||
|
||
/* Check if bit `bit` was previously set; return BIT_SET if true and | ||
BIT_NOT_SET if false and set the bit to 1 */ | ||
int ba_check_and_set_bit(bitarray_t ba, size_t bit); | ||
|
||
/* Toggle the bit by setting it to BIT_NOT_SET if currently is BIT_SET or | ||
vice versa; returns the updated value of the bit */ | ||
int ba_toggle_bit(bitarray_t ba, size_t bit); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters