C - Generic library