Parsing
include/parse.h View source View on GitHubStructs
Section titled “Structs”parse_list
Section titled “parse_list” struct parse_list (2 fields) source
Functions
Section titled “Functions”parse_is_bool
Section titled “parse_is_bool”bool parse_is_bool(const char *str, bool *out) source Returns true if the string matches the type, and stores parsed value in *out
parse_is_data_size
Section titled “parse_is_data_size”bool parse_is_data_size(const char *str, uint64_t *out) source parse_is_duration
Section titled “parse_is_duration”parse_is_cpu_mask
Section titled “parse_is_cpu_mask”parse_is_mac
Section titled “parse_is_mac”bool parse_is_mac(const char *str, uint64_t *out) source parse_is_fx
Section titled “parse_is_fx”parse_is_int
Section titled “parse_is_int”bool parse_is_int(const char *str, int64_t *out) source parse_is_uint
Section titled “parse_is_uint”bool parse_is_uint(const char *str, uint64_t *out) source parse_is_range
Section titled “parse_is_range”bool parse_is_range(const char *str, uint64_t *start, uint64_t *end) source parse_is_list
Section titled “parse_is_list”bool parse_is_list(const char *str, struct parse_list *out) source parse_list_free
Section titled “parse_list_free”void parse_list_free(struct parse_list *list) source Macros
Section titled “Macros”parse_list_for_each
Section titled “parse_list_for_each”#define parse_list_for_each(item_var_, list_) source Expansion
#define parse_list_for_each(item_var_, list_) \
for (size_t __pl_idx = 0; \
__pl_idx < (list_)->count && \
(((item_var_) = (list_)->items[__pl_idx]), true); \
__pl_idx++)