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

Function parse_err

ccan/ccan/opt/parse.c:16–23  ·  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,
18 const char *arg, unsigned len,
19 const char *problem)
20{
21 errlog("%s: %.*s: %s", argv0, len, arg, problem);
22 return -1;
23}
24
25static void consume_option(int *argc, char *argv[], unsigned optnum)
26{

Callers 1

parse_oneFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected