P99 – Preprocessor macros and functions for C99
P99 is a toolbox of macro and function definitions that ease the programming in modern C, aka C99. By using new tools from C99 it implements default arguments for functions, scope bound resource management, transparent allocation and initialization, …
The complexity of the tools ranges from very simple (but convenient) macros such as P99_INIT to relatively complex ones such as P99_UNWIND_PROTECT.
P99 is not a library but just a set of include files. You may include the whole by just using “p99.h” or cherry pick individual parts to your needs. You will not have to link against a special library the “only” prerequisite is that your compiler supports modern C, aka C99, to a wide extent.
So far I have tested P99
- on linux systems
- with INTEL 32 / 64 bit and ARM processors
- with four different compilers:
gcc
, clang
, opencc
and icc
- with code from an internal project.
If you are developing for another setting I would be very much curious to hear of your experience with P99.
P99 can be downloaded at p99.gforge.inria.fr. It is licensed under the QPL.