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

Function opt_register_table

ccan/ccan/opt/opt.c:197–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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