A red–black tree is a data structure which is a type of self-balancing binary search tree, this is an ANSI-C implementation using C preprocessor macros to create a generic container.
rb.h implements left-leaning 2-3 red-black trees as C preprocessor macros http://www.canonware.com/rb/