version 0.4.0
© David Thomas, 2013-2024
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 databasedatabases/pickle.h— (de-)serialising associative arraysdatabases/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 cachedatastruct/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/pixelfmt.h— pixel formatsframebuf/screen.h— screen type
geom/box.h— box typegeom/packer.h— box packing for layoutgeom/layout.h— laying out elements using the packergeom/point.h— point type
io/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
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: 18 of 18 tests passed.