SETBIT(9) | Kernel Developer's Manual | SETBIT(9) |
void
setbit(array, x);
void
clrbit(array, x);
int
isset(array, x);
int
isclr(array, x);
In a nutshell, setbit() sets the bit x in array, clrbit() clears it, isset() tests whether x is set, and isclr() returns 1 if x is not set.
char buf[10]; ... setbit(buf, 12); /* set the fifth bit in the second byte */
March 1, 2010 | NetBSD 6.1 |