#include "kubo_file.h" void kubo_file_parse(char *file_name) { static const cyaml_config_t config = { .log_fn = cyaml_log, .mem_fn = cyaml_mem, .log_level = CYAML_LOG_WARNING, }; struct numbers *n; cyaml_err_t err = cyaml_load_file(file_name, &config, &top_schema, (cyaml_data_t **)&n, NULL); if (err != CYAML_OK) { printf("cyaml err\n"); } printf("%s:\n", n->name); for (unsigned i = 0; i < n->data_count; i++) { printf(" - %i\n", n->data[i]); } err = cyaml_free(&config, &top_schema, n, 0); if (err != CYAML_OK) { printf("cyaml free err\n"); } }