-/** @brief Check that each variable have the right amount of values */
-void xbt_cfg_check(void)
-{
- xbt_dict_cursor_t cursor;
- xbt_cfgelm_t variable;
- char *name;
-
- xbt_dict_foreach((xbt_dict_t) simgrid_config, cursor, name, variable) {
- if (variable->type == xbt_cfgelm_alias)
- continue;
-
- int size = xbt_dynar_length(variable->content);
- if (variable->min > size) {
- xbt_dict_cursor_free(&cursor);
- THROWF(mismatch_error, 0, "Config elem %s needs at least %d %s, but there is only %d values.",
- name, variable->min, xbt_cfgelm_type_name[variable->type], size);
- }
-
- if (variable->isdefault && size > variable->min) {
- xbt_dict_cursor_free(&cursor);
- THROWF(mismatch_error, 0, "Config elem %s theoretically accepts %d %s, but has a default of %d values.",
- name, variable->min, xbt_cfgelm_type_name[variable->type], size);
- }
- }
- xbt_dict_cursor_free(&cursor);
-}
-