Chained list framework for C applications