+ printf("Current value%s: ", (size <= 1 ? "" : "s"));
+
+ if (size != 1)
+ printf(size == 0 ? "n/a\n" : "{ ");
+ for (i = 0; i < size; i++) {
+ const char *sep = (size == 1 ? "\n" : (i < size - 1 ? ", " : " }\n"));
+
+ switch (variable->type) {
+ case xbt_cfgelm_int:
+ printf("%d%s", xbt_dynar_get_as(variable->content, i, int), sep);
+ break;
+ case xbt_cfgelm_double:
+ printf("%f%s", xbt_dynar_get_as(variable->content, i, double), sep);
+ break;
+ case xbt_cfgelm_string:
+ printf("'%s'%s", xbt_dynar_get_as(variable->content, i, char *), sep);
+ break;
+ case xbt_cfgelm_boolean: {
+ int b = xbt_dynar_get_as(variable->content, i, int);
+ const char *bs = b ? xbt_cfgelm_boolean_values[0].true_val: xbt_cfgelm_boolean_values[0].false_val;
+ if (b == 0 || b == 1)
+ printf("'%s'%s", bs, sep);
+ else
+ printf("'%s/%d'%s", bs, b, sep);
+ break;
+ }
+ default:
+ printf("Invalid type!!%s", sep);
+ }
+ }
+ }
+ xbt_dynar_free(&names);
+}
+
+/** @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);