【文件属性】:
文件名称:bitfield:在BSD许可下用C编写的位域ADT,用于轻松管理位
文件大小:8KB
文件格式:ZIP
更新时间:2021-05-01 00:19:19
C
它是如何工作的?
/* allocate bitfield of 100 bits */
bitfield_t * bf = bitfield_new( 100 );
/* Mark 77th bit as on. */
bitfield_mark (bf, 77 );
/* Mark 50th bit as off. */
bitfield_unmark (bf, 50 );
/* Test if the 77th bit is marked */
if (bitfield_is_marked(bf, 77 ))
{
printf ( " 77th bit is marked \n " );
}
建造
$ make
【文件预览】:
bitfield-master
----package.json(228B)
----Makefile(549B)
----.travis.yml(29B)
----bitfield.c(3KB)
----README.md(339B)
----tests()
--------make-tests.sh(933B)
--------CuTest.c(7KB)
--------CuTest.h(4KB)
--------test_bitfield.c(1KB)
----bitfield.h(1KB)