-void xbt_cfg_set_boolean(xbt_cfg_t cfg, const char *name, const char *val)
-{
- xbt_cfgelm_t variable;
- int i, bval;
-
- XBT_VERB("Configuration setting: %s=%s", name, val);
- variable = xbt_cfgelm_get(cfg, name, xbt_cfgelm_boolean);
-
- for (i = 0; xbt_cfgelm_boolean_values[i].true_val != NULL; i++) {
- if (strcmp(val, xbt_cfgelm_boolean_values[i].true_val) == 0){
- bval = 1;
- break;
- }
- if (strcmp(val, xbt_cfgelm_boolean_values[i].false_val) == 0){
- bval = 0;
- break;
- }
- }
- if (xbt_cfgelm_boolean_values[i].true_val == NULL) {
- xbt_die("Value of option '%s' not valid. Should be a boolean (yes,no,on,off,true,false,0,1)", val);
- }
-
- if (variable->max == 1) {
- if (variable->cb_rm && !xbt_dynar_is_empty(variable->content))
- variable->cb_rm(name, 0);
-
- xbt_dynar_set(variable->content, 0, &bval);
- } else {
- if (variable->max
- && xbt_dynar_length(variable->content) ==
- (unsigned long) variable->max)
- THROWF(mismatch_error, 0,
- "Cannot add value %s to the config element %s since it's already full (size=%d)",
- val, name, variable->max);
-
- xbt_dynar_push(variable->content, &bval);
- }
-
- if (variable->cb_set)
- variable->cb_set(name, xbt_dynar_length(variable->content) - 1);
- variable->isdefault = 0;
-}
-
-/* ---- [ Removing ] ---- */
-
-/** @brief Remove the provided \e val integer value from a variable
- *
- * @param cfg the config set
- * @param name the name of the variable
- * @param val the value to be removed
- */
-void xbt_cfg_rm_int(xbt_cfg_t cfg, const char *name, int val)
-{
-
- xbt_cfgelm_t variable;
- unsigned int cpt;
- int seen;
-
- variable = xbt_cfgelm_get(cfg, name, xbt_cfgelm_int);
-
- if (xbt_dynar_length(variable->content) == variable->min)
- THROWF(mismatch_error, 0,
- "Cannot remove value %d from the config element %s since it's already at its minimal size (=%d)",
- val, name, variable->min);
-
- xbt_dynar_foreach(variable->content, cpt, seen) {
- if (seen == val) {
- if (variable->cb_rm)
- variable->cb_rm(name, cpt);
- xbt_dynar_cursor_rm(variable->content, &cpt);
- return;
- }
- }
-
- THROWF(not_found_error, 0,
- "Can't remove the value %d of config element %s: value not found.",
- val, name);
-}
-
-/** @brief Remove the provided \e val double value from a variable
- *
- * @param cfg the config set
- * @param name the name of the variable
- * @param val the value to be removed
- */
-
-void xbt_cfg_rm_double(xbt_cfg_t cfg, const char *name, double val)