https://github.com/cjhdev/circular_buffer
Circular Buffer
https://github.com/cjhdev/circular_buffer
Last synced: about 1 month ago
JSON representation
Circular Buffer
- Host: GitHub
- URL: https://github.com/cjhdev/circular_buffer
- Owner: cjhdev
- License: mit
- Created: 2017-09-02T16:17:48.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-03T00:14:40.000Z (over 8 years ago)
- Last Synced: 2025-03-14T09:23:46.864Z (about 1 year ago)
- Language: Makefile
- Homepage:
- Size: 145 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
Circular Buffer
===========================
[](https://travis-ci.org/cjhdev/circular_buffer)
- I am using C in an OO style so it is possible to have more than one instance
- My interface names line up with the requirements but these are probably too generic for practical use
- Buffer capacity is a compile time setting that defaults to 42 elements
- Redefine at compile time like this `-DCIRCULAR_BUFFER_SIZE=123`
- I am using Cmocka to exercise the code
- C source files are in `/src`
- [circular_buffer.c](src/circular_buffer.c)
- C header files are in `/include`
- [circular_buffer.h](include/circular_buffer.h)
- Test files are in `/test`
- [tc_circular_buffer.c](test/tc_circular_buffer.c)
- [makefile](test/makefile)
- Source has been linted with PCLINT usinng the configuration contained within `/pclint`
## Running the Tests
You need:
- GCC
- Make
- Gcov (if you want a coverage report)
From project root:
~~~
cd test
make
cd -
~~~
To see test coverage:
~~~
cd test
make coverage
cd -
~~~
## License
Circular Buffer has an MIT license.