libutil

C Utility Library
git clone https://git.omkov.net/libutil
git clone [email protected]:libutil
Log | Tree | Refs | README | LICENCE | Download

libutil/README.md (54 lines, 2.0 KiB) -rw-r--r-- blame download

01234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
# libutil

**libutil** is a lightweight library to be included locally in projects that is
intended to provide common portable extensions to the C standard library.

## Components

| Component        | Description                              | Standard |
| ---------------- | ---------------------------------------- | -------- |
| alloc            | Memory allocation wrapper functions      |          |
| base32           | Encode or decode Base32                  |          |
| base64           | Encode or decode Base64                  |          |
| crypt            | General cryptography functions           |          |
| endian           | Endianness related functions             |          |
| error            | Error reporting functions                |          |
| fnv              | FNV hashing algorithms                   |          |
| map              | Generic hashmap data structure           |          |
| mode             | Parse numeric or symbolic POSIX modes    |          |
| optget           | Parse command line options               |          |
| rc2              | RC2 encryption algorithm                 | RFC 2268 |
| strconv          | String conversion functions              |          |
| util             | Base typedefs and macros                 |          |

*Note that `util.h` is required by many other **libutil** components.*

## Usage

**libutil** is being developed on x86-64 Linux, is untested elsewhere, and some
components may depend on POSIX provided functionality.

**libutil** source files are intended to be built directly into projects, rather
than being compiled seperately and linked.

### Dependencies

- A C23 capable compiler, to build
- CMake >= 3.21, to build

### Building

To build **libutil**, from the project root, run `make build`.

- Binaries will be located in the `bin` directory.
- Libraries will be located in the `lib` directory.

### Testing

To run **libutil** unit tests on UNIX, run `make test`.

## Meta

Copyright (C) 2020, Jakob Wakeling  
[MIT Licence](https://opensource.org/licenses/MIT)