#include "reader.h" struct Reader_s { reader_func_t func; List *args; /* the list of arguments; could be NULL. */ }; void build_reader(Reader *reader, reader_func_t func, List *args) { reader->func = func; reader->args = args; } void destroy_reader(Reader *reader, int flag) { destroy_list(reader->args, flag); reader->args = NULL; reader->func = NULL; }