Parsing
include/parse.h View source View on GitHubStructs
Section titled “Structs”parse_list
Section titled “parse_list”struct parse_list {
size_t count;
char **items;
}; Functions
Section titled “Functions”parse_is_bool
Section titled “parse_is_bool”bool parse_is_bool(const char *str, bool *out); parse_is_data_size
Section titled “parse_is_data_size”bool parse_is_data_size(const char *str, uint64_t *out); parse_is_duration
Section titled “parse_is_duration”bool parse_is_duration(const char *str, time_ns_t *out); parse_is_cpu_mask
Section titled “parse_is_cpu_mask”bool parse_is_cpu_mask(const char *str, struct cpu_mask *out, size_t n_cpus); parse_is_mac
Section titled “parse_is_mac”bool parse_is_mac(const char *str, uint64_t *out); parse_is_fx
Section titled “parse_is_fx”bool parse_is_fx(const char *str, fx32_32_t *out); parse_is_int
Section titled “parse_is_int”bool parse_is_int(const char *str, int64_t *out); parse_is_uint
Section titled “parse_is_uint”bool parse_is_uint(const char *str, uint64_t *out); parse_is_range
Section titled “parse_is_range”bool parse_is_range(const char *str, uint64_t *start, uint64_t *end); parse_is_list
Section titled “parse_is_list”bool parse_is_list(const char *str, struct parse_list *out); parse_list_free
Section titled “parse_list_free”void parse_list_free(struct parse_list *list); Macros
Section titled “Macros”parse_list_for_each
Section titled “parse_list_for_each”#define parse_list_for_each(item_var, list) \
for (size_t __i = 0; \
__i < (list)->count && ((item_var = (list)->items[__i]), true); \
__i++)