Practical design patterns in C