unilib

Created by Alexander Nicholi
Copyright © 2019-2021 Aquefir
Released under BSD-2-Clause.

§1. WHAT IS THIS?
------------------

Unilib is one of the most heavily developed projects under the Aquefir
namesake. Its purpose is simple: provide primitive support functionality
for programs on a variety of platforms. These features are similar in nature
to the standard C library, and unilib does work without libc where it is
unavailable. The growing list of platforms it supports includes Microsoft
Windows (via Win32 APIs), Apple macOS, GNU/Linux, and the Nintendo Game Boy
Advance. Support for DOS systems on the IBM-PC is in planning too.

Unilib is written in ANSI C, and always will be. The project uses Slick
Makefiles for tooling out the development process.

§2. WHAT’S INSIDE THE BOX
--------------------------

Unilib provides shorthands for all kinds of primitive data types. These are
a good deal cleaner and quicker to type than those of <stdint.h>:

unilib:
	u32, s16, u8, u64, ...

stdint:
	uint32_t, int16_t, uint8_t, uint64_t, ...

There is also another shorthand called ptri (pronounced like ‘petri’). It is
an integer the same size as a pointer, and is used in place of size_t and the
like. There are also shorthands for exact-size floating point primitives.

Unilib provides math primitive structs for basic geometry in the 2D and 3D
contexts. It also includes structs for ranges (signed) and bounds (unsigned).
Additionally, there are also primitives for ‘vector types’; these use SIMD
intrinsics provided by the compiler where available, and transparently fall
back to plain array semantics otherwise.

Checked math macros are available to ensure against integer overflow. There
are also macros for endianness conversion operations. Unilib also provides a
portable uni_die() function that aborts the program, which is ideal for
dealing with programmer errors.

UTF-8 validation, conversion, and inspection routines are also available.
There are also high-level structs and function collections for
automatically-memory-managed strings and generic arrays.

Lastly, there are cross-platform wrappers for standard I/O and heap usage,
which either wrap or implement logging and malloc where necessary.

§3. FOOTNOTES
--------------

Unilib is released under the BSD-2-Clause licence. See the COPYING file for
full terms.

Unilib adheres to ADP 1 for its repository layout, and ADP 2 for its
documentation.

§4. REFERENCES & ADDITIONAL READING
------------------------------------

ISO/IEC 9899:1990. Programming Languages – C.
	<https://www.iso.org/standard/17782.html>

Nicholi, Alexander. Slick.
	<https://github.com/aquefir/slick>

Nicholi, Alexander. Project repository filesystem schema.
	<https://aquefir.co/adp1>

Nicholi, Alexander. Slick documentation format.
	<https://aquefir.co/adp2>
