{"id":16343981,"url":"https://github.com/dhess/c-ringbuf","last_synced_at":"2025-04-04T23:08:37.068Z","repository":{"id":48964785,"uuid":"1945395","full_name":"dhess/c-ringbuf","owner":"dhess","description":"A ring buffer implemented in C","archived":false,"fork":false,"pushed_at":"2024-03-13T10:39:54.000Z","size":70,"stargazers_count":429,"open_issues_count":12,"forks_count":145,"subscribers_count":31,"default_branch":"master","last_synced_at":"2025-03-28T22:13:20.161Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dhess.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2011-06-24T02:04:20.000Z","updated_at":"2025-03-12T10:52:03.000Z","dependencies_parsed_at":"2025-01-25T22:07:54.864Z","dependency_job_id":"22c01c72-c824-40d1-ab7c-edfc46620f4e","html_url":"https://github.com/dhess/c-ringbuf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhess%2Fc-ringbuf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhess%2Fc-ringbuf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhess%2Fc-ringbuf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhess%2Fc-ringbuf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dhess","download_url":"https://codeload.github.com/dhess/c-ringbuf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247261609,"owners_count":20910108,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T00:26:27.953Z","updated_at":"2025-04-04T23:08:37.051Z","avatar_url":"https://github.com/dhess.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# WHAT\n\n`c-ringbuf` is a simple ring buffer implementation in C.\n\nIt includes support for `read(2)` and `write(2)` operations on ring buffers, `memcpy`'s into and out of ring buffers, setting the buffer contents to a constant value, and copies between ring buffers. It also supports searching for single characters, for use with line-oriented or character-delimited network protocols.\n\nIt should be fairly straightforward to extend `c-ringbuf` to support other C library operations that operate on buffers, e.g., `recv(2)`.\n\n# WHY\n\nI implemented `c-ringbuf` because I needed a simple, dependency-free ring buffer type for use with network services written in C.\n\n# INSTALLING\n\n`c-ringbuf` is not a library as such, so it doesn't need to be installed. Just copy the `ringbuf.[ch]` source files into your project. (Also see [LICENSE](#license) below.)\n\n`c-ringbuf` has no dependencies beyond an ISO C90 standard library.\n\nNote that `ringbuf.c` contains several `assert()` statements. These are intended for use with the test harness (see below), and should probably be removed from production code, once you're confident that `c-ringbuf` works as intended.\n\nThis distribution includes source for a test program executable (`ringbuf-test.c`), which runs extensive unit tests on the `c-ringbuf` implementation. On most platforms (other than Windows, which is not supported), you should be able to type `make` to run the unit tests. Note that the [Makefile](Makefile) uses the `clang` C compiler by default, but also has support for `gcc` -- just edit the [Makefile](Makefile) so that it uses `gcc` instead of `clang`.\n\nThe [Makefile](Makefile) also includes targets for `gcov` coverage testing and `valgrind` memory testing, assuming you have those tools installed on your system.\n\n# LICENSE\n\n`c-ringbuf` has no license; it is dedicated to the public domain. See the file [COPYING](COPYING), included in this distribution, for the specifics.\n\n# CONTRIBUTING\n\nIf you would like to make a pull request (PR) or other contribution to this project, please see [CONTRIBUTING.md](.github/CONTRIBUTING.md) for details on how to do that.\n\n# CONTACT\n\nDrew Hess \u003csrc@drewhess.com\u003e\n\nhttps://drewhess.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhess%2Fc-ringbuf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdhess%2Fc-ringbuf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhess%2Fc-ringbuf/lists"}