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

Function parse_err

ccan/ccan/opt/parse.c:16–22  ·  view source on GitHub ↗

glibc does this as: /tmp/opt-example: invalid option -- 'x' /tmp/opt-example: unrecognized option '--long' /tmp/opt-example: option '--someflag' doesn't allow an argument /tmp/opt-example: option '--s' is ambiguous /tmp/opt-example: option requires an argument -- 's' */

Source from the content-addressed store, hash-verified

14/tmp/opt-example: option requires an argument -- 's'
15*/
16static int parse_err(void (*errlog)(const char *fmt, ...),
17 const char *argv0, const char *arg, unsigned len,
18 const char *problem)
19{
20 errlog("%s: %.*s: %s", argv0, len, arg, problem);
21 return -1;
22}
23
24static void consume_option(int *argc, char *argv[], unsigned optnum)
25{

Callers 1

parse_oneFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected