aboutsummaryrefslogtreecommitdiff
path: root/src/config.h
blob: 8de4399dd1cf4333125bc94128987652a93eae5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include "lua.h"


extern int _print_type;
extern int _max_depth;
extern int _start_nl_at;
extern int _collapse_all;
extern int _collapse_to_memory;

extern int _file_malloc_chunk;

struct str_to_int {
  const char* key;
  int* value;
};

static struct str_to_int config_map[] = {
  {"file_chunksize", &_file_malloc_chunk},
  {"print_type", &_print_type},
  {"max_depth", &_max_depth},
  {"collapse_all", &_collapse_all},
  {"start_nl_at", &_start_nl_at},
  {"collapse_to_memory", &_collapse_to_memory},
  {NULL,NULL}
};

int l_set(lua_State*);

static const luaL_Reg config_function_list [] = {
  {"set",l_set},
  {NULL,NULL}
};