Core header libraries and utilities
Go to file
Přemysl Eric Janouch 0239a4242a
liberty-xdg: fix usage of volatile
2024-02-10 10:16:27 +01:00
cmake Add a CMake module for icon conversions 2024-02-10 05:39:15 +01:00
meson/packaging Little improvements 2017-07-24 03:46:06 +02:00
tests Add a C++ backend for LibertyXDR 2023-07-07 16:43:52 +02:00
tools lxdrgen-cpp-win32: fix return value handling 2023-07-10 09:34:42 +02:00
.clang-format Add clang-format configuration, clean up 2021-10-30 03:10:17 +02:00
.gitignore Update .gitignore 2021-10-30 03:31:08 +02:00
CMakeLists.txt CMakeLists.txt: declare compatibility with 3.27 2023-08-01 03:22:17 +02:00
LICENSE Add helper functions for reading binary numbers 2024-02-10 07:02:54 +01:00
README.adoc Add a C++ backend for LibertyXDR 2023-07-07 16:43:52 +02:00
fuzz Add remaining fuzzing entry points 2020-10-12 02:07:07 +02:00
liberty-proto.c MPD client: fix build on OpenIndiana 2023-07-24 08:33:45 +02:00
liberty-pulse.c Import libpulse poller integration, add tests 2021-11-07 15:37:21 +01:00
liberty-xdg.c liberty-xdg: fix usage of volatile 2024-02-10 10:16:27 +01:00
liberty-xui.c liberty-xui: tolerate zero-area ConfigureNotify 2024-02-10 10:07:09 +01:00
liberty.c Add helper functions for reading binary numbers 2024-02-10 07:02:54 +01:00
libertyconf.vim Add VIM syntax highlight for "config" 2017-06-12 02:48:42 +02:00
libertyxdr.adoc Improve documentation 2022-10-04 01:46:41 +02:00
libertyxdr.vim Import protocol code generator from xK, add tests 2022-09-30 03:06:36 +02:00
siphash.c Add clang-format configuration, clean up 2021-10-30 03:10:17 +02:00

README.adoc

liberty

liberty is a pseudolibrary largely consisting of reusable C code for my various projects. I used to copy-paste large swaths of it with minimal changes, and it slowly became awfully painful to synchronize. The project can be thought of as a successor to my other C library, libxtnd.

You are supposed to import it as a git submodule and include the main source file directly everywhere you need it, setting feature flags as appropriate. Everything is declared "static". I have come to the conclusion that this style of C programming suits me the best, as it allows me to nearly forget about the mess that are header files.

The API is intentionally unstable, which allows for easy refactoring.

All development is done on Linux, but other POSIX-compatible operating systems should be generally supported as well. They have an extremely low priority, however, and Im not testing them at all, perhaps with the exception of macOS.

Tools

This project also hosts a number of supporting scripts written in portable AWK:

asciiman.awk

A fallback manual page generator for AsciiDoc documents, motivated by the hugeness of AsciiDocs and Asciidoctors dependency trees. Just like them, it uses the man macro package.

cmake-parser.awk

Parses the CMake language to the extent that is necessary to reliably extract project versions. Its greatest limitation is its inability to expand variables, which would require a full interpreter.

cmake-dump.awk

This can be used in conjunction with the previous script to dump CMake scripts in a normalized format for further processing.

lxdrgen.awk

Protocol code generator for a variant of XDR, which is documented separately. Successfully employed in xK.

lxdrgen-c.awk

LibertyXDR backend that builds on top of the C pseudolibrary.

lxdrgen-cpp.awk
lxdrgen-cpp-win32.cpp
lxdrgen-cpp-posix.cpp

LibertyXDR backend for C++, primarily targeting Win32 and its wide strings. Link the result together with one of the accompanied source files.

lxdrgen-go.awk

LibertyXDR backend for Go, supporting encoding/json interfaces. It also produces optimized JSON marshallers (however, note that the json.Marshaler interface is bound to be underperforming, due to the amount of otherwise avoidable memory allocations it necessitates).

lxdrgen-mjs.awk

LibertyXDR backend for Javascript, currently for decoding only. It cuts a corner by not using BigInts, on par with JSON.parse().

lxdrgen-swift.awk

LibertyXDR backend for the Swift programming language.

Contributing and Support

Use https://git.janouch.name/p/liberty to report any bugs, request features, or submit pull requests. git send-email is tolerated. If you want to discuss the project, feel free to join me at ircs://irc.janouch.name, channel #dev.

Bitcoin donations are accepted at: 12r5uEWEgcHC46xd64tt3hHt9EUvYYDHe9

License

This software is released under the terms of the 0BSD license, the text of which is included within the package along with the list of authors.