util: add opt_value and opt_string methods

This commit is contained in:
MK3S+ Printer
2023-05-08 17:24:03 +02:00
committed by Kamil Trzcinski
parent 61e9d6bae4
commit eec4e7bb39
2 changed files with 31 additions and 11 deletions

View File

@ -73,4 +73,7 @@ typedef struct options_s {
.description = _desc, \
}
const char *opt_value_to_string(const option_value_t *values, int value, const char *def);
int opt_string_to_value(const option_value_t *values, const char *name, int def);
int parse_opts(option_t *options, int argc, char *argv[]);