C implementation of a List