https://github.com/xmidt-org/cutils
Common functions used in the xmidt-org programs.
https://github.com/xmidt-org/cutils
Last synced: 11 days ago
JSON representation
Common functions used in the xmidt-org programs.
- Host: GitHub
- URL: https://github.com/xmidt-org/cutils
- Owner: xmidt-org
- Created: 2021-07-16T22:37:32.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-02-26T14:52:18.000Z (about 3 years ago)
- Last Synced: 2025-05-13T00:52:36.362Z (11 days ago)
- Language: C
- Size: 222 KB
- Stars: 1
- Watchers: 6
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSES/Apache-2.0.txt
Awesome Lists containing this project
README
# cutils
Common functions used in the xmidt-org programs.
[](https://github.com/xmidt-org/cutils/actions)
[](https://codecov.io/gh/xmidt-org/cutils)
[](https://scan.coverity.com/projects/xmidt-org-cutils)
[](https://sonarcloud.io/dashboard?id=xmidt-org_cutils)
[](https://lgtm.com/projects/g/xmidt-org/cutils/context:cpp)
[](CHANGELOG.md)Now that meson makes including subprojects easy, let's move common functions
into a shared library.## What goes in here?
Generally annoying things you'd expect to just work. Reliable `strnlen()`,
`strdup()`, `strndup()` are a few. `maprintf()` that just outputs to a
correctly sized buffer you free (& the common friends).There are some useful non-localized versions of string functions. These
are important for libraries that deal with networking focused protocols.There is a safer version of `realloc()` as well as `memdup()` ... because it
happens & you need to do it.And a few other favorites: `xxd()` which is a debugger's dream for outputting
buffers.Plus yet another base64 implementation for both `standard` as well as `url`
versions.## What doesn't go in here?
If it doesn't feel like it's "missing" from a "standard library" then it goes
elsewhere.# Building and Testing Instructions
```
meson setup --warnlevel 3 --werror build
cd build
ninja all test coverage
firefox meson-logs/coveragereport/index.html
```