libutil

C Utility Library
git clone http://git.omkov.net/libutil
Log | Tree | Refs | README | LICENCE | Download

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

98e5939 Jamozed 2021-11-27 17:53:46
0
# libutil
5eb6683 Jamozed 2020-10-26 13:02:18
1
98e5939 Jamozed 2021-11-27 17:53:46
2
**libutil** is a lightweight library to be included locally in projects that is
98e5939 Jamozed 2021-11-27 17:53:46
3
intended to provide common portable extensions to the C standard library.
5eb6683 Jamozed 2020-10-26 13:02:18
4
5eb6683 Jamozed 2020-10-26 13:02:18
5
## Components
5eb6683 Jamozed 2020-10-26 13:02:18
6
3b606bc Jamozed 2021-09-04 00:05:02
7
| Component        | Description                              | Standard |
3b606bc Jamozed 2021-09-04 00:05:02
8
| ---------------- | ---------------------------------------- | -------- |
8a5f06f Jamozed 2022-02-09 20:04:50
9
| alloc            | Memory allocation wrapper functions      |          |
3b606bc Jamozed 2021-09-04 00:05:02
10
| base32           | Encode or decode Base32                  |          |
3b606bc Jamozed 2021-09-04 00:05:02
11
| base64           | Encode or decode Base64                  |          |
8a5f06f Jamozed 2022-02-09 20:04:50
12
| crypt            | General cryptography functions           |          |
3b606bc Jamozed 2021-09-04 00:05:02
13
| endian           | Endianness related functions             |          |
3b606bc Jamozed 2021-09-04 00:05:02
14
| error            | Error reporting functions                |          |
12c01d4 Jamozed 2021-09-04 14:07:48
15
| fnv              | FNV hashing algorithms                   |          |
8a5f06f Jamozed 2022-02-09 20:04:50
16
| map              | Generic hashmap data structure           |          |
3b606bc Jamozed 2021-09-04 00:05:02
17
| mode             | Parse numeric or symbolic POSIX modes    |          |
3b606bc Jamozed 2021-09-04 00:05:02
18
| optget           | Parse command line options               |          |
3b606bc Jamozed 2021-09-04 00:05:02
19
| rc2              | RC2 encryption algorithm                 | RFC 2268 |
3b606bc Jamozed 2021-09-04 00:05:02
20
| strconv          | String conversion functions              |          |
8a5f06f Jamozed 2022-02-09 20:04:50
21
| util             | Base typedefs and macros                 |          |
8a5f06f Jamozed 2022-02-09 20:04:50
22
8a5f06f Jamozed 2022-02-09 20:04:50
23
*Note that `util.h` is required by many other **libutil** components.*
5eb6683 Jamozed 2020-10-26 13:02:18
24
406a4fa Jamozed 2021-09-04 00:26:09
25
## Usage
5eb6683 Jamozed 2020-10-26 13:02:18
26
8a5f06f Jamozed 2022-02-09 20:04:50
27
**libutil** is being developed on x86-64 Linux, is untested elsewhere, and some
8a5f06f Jamozed 2022-02-09 20:04:50
28
components may depend on POSIX provided functionality.
5eb6683 Jamozed 2020-10-26 13:02:18
29
7af2131 Jamozed 2022-01-06 00:39:34
30
**libutil** source files are intended to be built directly into projects, rather
7af2131 Jamozed 2022-01-06 00:39:34
31
than being compiled seperately and linked.
5eb6683 Jamozed 2020-10-26 13:02:18
32
406a4fa Jamozed 2021-09-04 00:26:09
33
### Dependencies
406a4fa Jamozed 2021-09-04 00:26:09
34
beca186 Jakob Wakeling 2024-05-18 12:12:17
35
- A C23 capable compiler, to build
beca186 Jakob Wakeling 2024-05-18 12:12:17
36
- CMake >= 3.21, to build
406a4fa Jamozed 2021-09-04 00:26:09
37
406a4fa Jamozed 2021-09-04 00:26:09
38
### Building
406a4fa Jamozed 2021-09-04 00:26:09
39
beca186 Jakob Wakeling 2024-05-18 12:12:17
40
To build **libutil**, from the project root, run `make build`.
406a4fa Jamozed 2021-09-04 00:26:09
41
8914f44 Jamozed 2022-02-05 22:36:04
42
- Binaries will be located in the `bin` directory.
8914f44 Jamozed 2022-02-05 22:36:04
43
- Libraries will be located in the `lib` directory.
406a4fa Jamozed 2021-09-04 00:26:09
44
406a4fa Jamozed 2021-09-04 00:26:09
45
### Testing
406a4fa Jamozed 2021-09-04 00:26:09
46
beca186 Jakob Wakeling 2024-05-18 12:12:17
47
To run **libutil** unit tests on UNIX, run `make test`.
5eb6683 Jamozed 2020-10-26 13:02:18
48
5eb6683 Jamozed 2020-10-26 13:02:18
49
## Meta
5eb6683 Jamozed 2020-10-26 13:02:18
50
5eb6683 Jamozed 2020-10-26 13:02:18
51
Copyright (C) 2020, Jakob Wakeling  
7f427d9 Jamozed 2022-03-06 12:55:13
52
[MIT Licence](https://opensource.org/licenses/MIT)
53