MCPcopy Create free account
hub / github.com/ElementsProject/lightning / _opt_register

Function _opt_register

ccan/ccan/opt/opt.c:161–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159}
160
161void _opt_register(const char *names, enum opt_type type,
162 char *(*cb)(void *arg),
163 char *(*cb_arg)(const char *optarg, void *arg),
164 void (*show)(char buf[OPT_SHOW_LEN], const void *arg),
165 const void *arg, const char *desc)
166{
167 struct opt_table opt;
168 opt.names = names;
169 opt.type = type;
170 opt.cb = cb;
171 opt.cb_arg = cb_arg;
172 opt.show = show;
173 opt.u.carg = arg;
174 opt.desc = desc;
175 check_opt(&opt);
176 add_opt(&opt);
177}
178
179bool opt_unregister(const char *names)
180{

Callers 1

mainFunction · 0.85

Calls 2

check_optFunction · 0.85
add_optFunction · 0.85

Tested by 1

mainFunction · 0.68