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

Function opt_register_table

ccan/ccan/opt/opt.c:198–218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196}
197
198void opt_register_table(const struct opt_table entry[], const char *desc)
199{
200 unsigned int i, start = opt_count;
201
202 if (desc) {
203 struct opt_table heading = OPT_SUBTABLE(NULL, desc);
204 add_opt(&heading);
205 }
206 for (i = 0; entry[i].type != OPT_END; i++) {
207 if (entry[i].type & OPT_SUBTABLE)
208 opt_register_table(subtable_of(&entry[i]),
209 entry[i].desc);
210 else {
211 check_opt(&entry[i]);
212 add_opt(&entry[i]);
213 }
214 }
215 /* We store the table length in arg ptr. */
216 if (desc)
217 opt_table[start].u.tlen = (opt_count - start);
218}
219
220/* Parse your arguments. */
221bool opt_parse(int *argc, char *argv[], void (*errlog)(const char *fmt, ...))

Callers 5

mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85

Calls 2

add_optFunction · 0.85
check_optFunction · 0.85

Tested by 5

mainFunction · 0.68
mainFunction · 0.68
mainFunction · 0.68
mainFunction · 0.68
mainFunction · 0.68