84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
return 0;
}
## struct kcli_opt
a `kcli_opt` is a representation of a command-line flag and its function. each option must have a unique `id` and/or a unique `name`.
* `char id` - the short single-character form of the flag (or NUL for no short form)
* `const char* name` - the long string form of the flag (or NULL for no long form)
* `kcli_opt_kind kind` - enum that describes how the flag will function
* `void* val` - a pointer to an appropriate type to store the return value in.
* `const char* desc` - a description of the flag's purpose and function (or NULL for no description)
## enum kcli_opt_kind
|
|
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
return 0;
}
## struct kcli_opt
a `kcli_opt` is a representation of a command-line flag and its function. each option must have a unique `id` and/or a unique `name`.
* `rune id` - the short single-character form of the flag as a UTF-8 codepoint (or initial NUL for no short form)
* `const char* name` - the long string form of the flag (or NULL for no long form)
* `kcli_opt_kind kind` - enum that describes how the flag will function
* `void* val` - a pointer to an appropriate type to store the return value in.
* `const char* desc` - a description of the flag's purpose and function (or NULL for no description)
## enum kcli_opt_kind
|