summaryrefslogtreecommitdiff
path: root/src/reader.c
blob: 4bbcf5a53d82477cefcbcb683347dbf031cad281 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#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;
}