MCPcopy Create free account
hub / github.com/cppla/ServerStatus / argparse_short_opt

Function argparse_short_opt

server/src/argparse.c:118–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118static int
119argparse_short_opt(struct argparse *this_, const struct argparse_option *options)
120{
121 for (; options->type != ARGPARSE_OPT_END; options++) {
122 if (options->short_name == *this_->optvalue) {
123 this_->optvalue = this_->optvalue[1] ? this_->optvalue + 1 : NULL;
124 return argparse_getvalue(this_, options, 0);
125 }
126 }
127 return -2;
128}
129
130static int
131argparse_long_opt(struct argparse *this_, const struct argparse_option *options)

Callers 1

argparse_parseFunction · 0.85

Calls 1

argparse_getvalueFunction · 0.85

Tested by

no test coverage detected