Renamed R_BIT_SWAP to R_BIT_TOGGLE

This commit is contained in:
Khairul Kasmiran 2018-01-07 14:46:35 +08:00
parent 9e516fe6dc
commit 3458ef6195
2 changed files with 3 additions and 3 deletions

View File

@ -276,7 +276,7 @@ static inline void *r_new_copy(int size, void *data) {
#define R_BIT_SET(x,y) (((ut8*)x)[y>>4] |= (1<<(y&0xf)))
#define R_BIT_UNSET(x,y) (((ut8*)x)[y>>4] &= ~(1<<(y&0xf)))
#define R_BIT_SWAP(x, y) ( R_BIT_CHK (x, y) ? \
#define R_BIT_TOGGLE(x, y) ( R_BIT_CHK (x, y) ? \
R_BIT_UNSET (x, y): R_BIT_SET (x, y))
//#define R_BIT_CHK(x,y) ((((const ut8*)x)[y>>4] & (1<<(y&0xf))))

View File

@ -2007,7 +2007,7 @@ R_API const char *r_str_firstbut (const char *s, char ch, const char *but) {
isbut = strchr (but, *p);
if (isbut) {
idx = (int)(size_t)(isbut - but);
_b = R_BIT_SWAP(b, idx);
_b = R_BIT_TOGGLE (b, idx);
continue;
}
if (*p == ch && !_b) {
@ -2033,7 +2033,7 @@ R_API const char *r_str_lastbut (const char *s, char ch, const char *but) {
isbut = strchr (but, *p);
if (isbut) {
idx = (int)(size_t)(isbut - but);
_b = R_BIT_SWAP(b, idx);
_b = R_BIT_TOGGLE (b, idx);
continue;
}
if (*p == ch && !_b) {