Skip to content

xmidt-org/cutils

Repository files navigation

cutils

Common functions used in the xmidt-org programs.

Build Status codecov.io coverity Quality Gate Status Language Grade: C/C++ GitHub release

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