ArgRole
Description
What kind of slot this is (value option, flag, count, positional). Registration verbs map 1:1 to this enum.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
ArgParse.c:418:
void arg_register(
ArgParse *self,
ArgRole role,
const char *short_name,
const char *long_name,- In
ArgParse.h:82:
ARG_ROLE_COUNT, // no value, increments per occurrence (integer target)
ARG_ROLE_POSITIONAL, // value, positional slot (always required)
} ArgRole;
///
- In
ArgParse.h:116:
const char *long_name; // "--listen" for options; metavar (e.g. "hostname") for positionals
const char *help; // one-line description for `--help`
ArgRole role;
ArgKind kind;
void *target;- In
ArgParse.h:185:
void arg_register(
ArgParse *self,
ArgRole role,
const char *short_name,
const char *long_name,
Last updated on