libcutil - Library of Miscellaneous C routines

libcutil is a small library of diverse C routines that started out as required pieces in several larger projects. I decided to collect these items together into one small library to make it easier to reuse the pieces in other projects. The entire library was written from scratch and is licensed under the GNU GPL, and will always be that way.

Library Features

  • Completely covered by the GNU GPL license.
  • Extended string manipulation functions
  • Attribute implementation (name=value pairs)
  • Base64 encode/decode functions
  • CRC generation functions (32 bit)
  • Single-Linked list implementation
  • URL encode/decode functions
  • XMLRPC implementation
  • Queue implementation
  • AVL binary search tree implementation
  • SER - (Simple Encoding Rules) A self-describing, byte-aligned protocol implementation


Documentation

Several examples of using the various library functions can be found in the tests/ directory of the source tarball.


Requirements

The primary development environment is Linux, GCC and glibc, but the code should compile with any good C development environment.

To compile the XMLRPC implementation portion, you need to install libxml2.

The library will compile under win32/win64, using MinGW(www.mingw.org) and the included makefiles(makefile.w32). Using MinGW as a cross-compiler is also supported.


Installation using our repositories

For RPM-based distributions (CentOS/RockyLinux/RHEL EL5-EL9) you can install this package with the following commands:

sudo wget -O /etc/yum.repos.d/ocs.repo https://www.opencomputingsolutions.com/pub/rpms/centos/ocs-centos.repo
sudo yum -y install libcutil


For Ubuntu-based distributions you can install this package with the following commands:

All Releases (signing key import)
sudo mkdir -p /etc/apt/keyrings
sudo wget -O /etc/apt/keyrings/ocs.asc https://www.opencomputingsolutions.com/pub/deb/ubuntu/pubkey.gpg

Jammy Release

sudo wget -O /etc/apt/sources.list.d/ocs-ubuntu-jammy.list https://www.opencomputingsolutions.com/pub/deb/ubuntu/ocs-ubuntu-jammy.list
sudo apt-get update
sudo apt-get -y install libcutil1

Focal Release
sudo wget -O /etc/apt/sources.list.d/ocs-ubuntu-focal.list https://www.opencomputingsolutions.com/pub/deb/ubuntu/ocs-ubuntu-focal.list

sudo apt-get update
sudo apt-get -y install libcutil1

Bionic Release
sudo wget -O /etc/apt/sources.list.d/ocs-ubuntu-bionic.list https://www.opencomputingsolutions.com/pub/deb/ubuntu/ocs-ubuntu-bionic.list

sudo apt-get update
sudo apt-get -y install libcutil1 

 

Download
The current version of libcutil is 0.2.2 and sources are available in the following location: https://www.opencomputingsolutions.com/pub/src/