version 0.5.0
© David Thomas, 2013-2026
DPTLib is my platform independent C library. It contains a wide variety of functions, formed of various portable C code that I've written for PrivateEye, MotionMasks and other projects. Please consider it a permanent work in progress.
base/debug.h— debugging and logging macrosbase/result.h— generic function return valuesbase/types.h— fixed-width integer typesbase/utils.h— various utilities
databases/digest-db.h— digest databasedatabases/filename-db.h— filename databasedatabases/tag-db.h— tag database {docs}databases/pickle.h— (de-)serialising associative arrays {docs}databases/pickle-reader-hash.h— glue methods to let pickle read from hashesdatabases/pickle-writer-hash.h— glue methods to let pickle write to hashes
datastruct/atom.h— indexed data block storagedatastruct/bitarr.h— arrays of bitsdatastruct/bitfifo.h— fifo which stores bitsdatastruct/bitvec.h— flexible arrays of bitsdatastruct/cache.h— generic single-block cache {docs}datastruct/hash.h— associative arraysdatastruct/hlist.h— "Hanson" linked list library - from the book C Interfaces and Implementationsdatastruct/list.h— linked listsdatastruct/ntree.h— n-ary treesdatastruct/vector.h— flexible arrays
framebuf/bitmap.h— bitmap image typeframebuf/bitmap-set.h— a set of bitmap images
framebuf/bmfont.h— a proportional bitmap font engine {docs}framebuf/colour.h— colour definition and conversionframebuf/composite.h— Porter-Duff image compositing {docs}framebuf/curve.h— Bezier curve calculationsframebuf/palettes.h— standard colour palettesframebuf/pixelfmt.h— pixel formatsframebuf/screen.h— screen typeframebuf/span.h— interface of plotting methodsframebuf/span-registry.h— registry of plotting methods by pixel formatframebuf/span-bgrx8888.h— plotting methods for BGRx8888framebuf/span-rgba8888.h— plotting methods for RGBA8888framebuf/span-rgbx8888.h— plotting methods for RGBx8888framebuf/span-xbgr8888.h— plotting methods for XBGR8888
geom/box.h— box typegeom/packer.h— box packing for layout {docs}geom/layout.h— laying out elements using the packergeom/line.h— line type and clippinggeom/point.h— point type
io/path.h— filename path handlingio/stream.h— stream system {docs}io/stream-stdio.h— C standard IO stream implementationio/stream-mem.h— memory block IO stream implementationio/stream-packbits.h— PackBits compression - from TIFFio/stream-mtfcomp.h— "move to front" adaptive compression stream - from the book Small Memory Software, Chapter 4
test/txtscr.h— text format 'screen'
utils/array.h— array utilitiesutils/barith.h— binary arithmeticutils/bsearch.h— binary searching arraysutils/bytesex.h— reversing bytesexutils/fxp.h— fixed point helpersutils/maths.h— maths utilsutils/pack.h— structure packing and unpacking helpersutils/primes.h— cache of prime numbers
wuss/wuss.h— minimal window manager {docs}wuss/window.h— window creation, positioning, sizing and client delegation
Use CMake, e.g.:
mkdir build
cd build
cmake ..
make -j4
Enable BUILD_TESTS, e.g. using ccmake and build. Then invoke DPTLibTest like:
./DPTLibTest -resources <path to DPTLib>
It'll spew a load of test output. If successful you'll see:
++ Tests completed in 0.9909s: 20 of 20 tests passed.