My C programs & libraries

Here are some hacks and algorithms I've implemented in C, all are distributed under GNU GPL.


debug

Is simple library for debug prints. Supports redirecting messages to stderr, file and socket. It's also nice example how to use C99 macros with variable number of parameters and va_list.

Download: debug.tar.bz2


pdb2txt

I've created a set of simple and clean utils for dumping data and content from pdb text document files. The tarball consists of the pdb-reading library and tools 'pdbdump' and 'pdb2txt'. Pdbdump allows you to see every part of the file or header in human readable format and it's also example how to use the library. Pdb2txt is pdb to plaintext decompressor with a lot of sanity checks.

Download: pdb2txt.tar.bz2


Self

This is really small and ugly C source code that write its source to standart out. It's probably not compatible with non glibc C linux library, but it can be easily fixed in first line (You can do it yourself, do you?).

Download: self.c


Skip list

Skiplist is probalistic data structure based on parallel linked lists and it's useful for searching algorithms. I'ts efficiency is comparable to binary trees but it's non recursive implementation ( witch is usually more faster ) is less complex so that implementation is easier and there is less lines that can be buggy. For more see: Wikipedia.

My implementation is non recusive; using field of pointers to represent skiplist node and one additional pointer to data.

Download: skiplist.tar.bz2