Public domain utilities for C99
Release v1.0.1
Use self-referential sizeof expressions for self pointer allocations
Fix incorrect sizeof expression in autil_freezer_new



You can also use your local clone with git send-email.


Public domain headers containing functions and data structures for rapid application development in C99 (or later).

Library Description
autil.h General purpose utility functions and data structures
atest.h Dead simple unit testing library
aengn.h 2D game engine with pixel coordinates (SDL2 backend)

See individual header files for usage instructions.

#Building and Running Unit/Integration Tests

#POSIX c99

$ make test CFLAGS='$(C99_DBG)'  # Debug
$ make test                      # Release

#GCC or Clang

$ make test CC=clang CFLAGS='$(GNU_DBG)'              # Debug
$ make test CC=clang CFLAGS='$(GNU_DBG) $(SANITIZE)'  # Debug with Address
                                                      # Sanitizer (glibc only)
$ make test CC=clang CFLAGS='$(GNU_REL)'              # Release

#Building and Running Examples


Applications built using aengn.h link against SDL2, SDL2_image, and SDL2_mixer for native builds and compile with Emscripten's emcc for web builds. SDL2 and its extension libraries are provided by most package managers, and can be installed on Debian-based distros with:

$ apt-get install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev

The Emscripten toolchain can be downloaded and activated with:

$ git clone https://github.com/emscripten-core/emsdk.git
$ cd emsdk/
$ ./emsdk install latest  # Download and install latest SDK (do this once)
$ ./emsdk activate latest # Make the latest SDK active (do this once)
$ source ./emsdk_env.sh   # Setup envrionment (source this every time)


$ make examples CFLAGS='$(C99_DBG)'  # Debug   (c99)
$ make examples                      # Release (c99)

$ make examples CC=clang CFLAGS='$(GNU_DBG)'  # Debug   (gcc/clang)
$ make examples CC=clang CFLAGS='$(GNU_REL)'  # Release (gcc/clang)

$ make examples-web CFLAGS='$(GNU_DBG)'  # Debug   (emscripten)
$ make examples-web CFLAGS='$(GNU_REL)'  # Release (emscripten)


To run an example with the name example-name:

$ (cd examples/ && ./example-name)

which will set the working directory to example/ for applications that load assets via relative paths.


All content in this repository is licensed under the Zero-Clause BSD license.

See LICENSE for more information.