MCPcopy Create free account
hub / github.com/cofyc/argparse / argparse_error

Function argparse_error

argparse.c:36–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34}
35
36static void
37argparse_error(struct argparse *self, const struct argparse_option *opt,
38 const char *reason, int flags)
39{
40 (void)self;
41 if (flags & OPT_LONG) {
42 fprintf(stderr, "error: option `--%s` %s\n", opt->long_name, reason);
43 } else {
44 fprintf(stderr, "error: option `-%c` %s\n", opt->short_name, reason);
45 }
46 exit(EXIT_FAILURE);
47}
48
49static int
50argparse_getvalue(struct argparse *self, const struct argparse_option *opt,

Callers 1

argparse_getvalueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected