X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/782a240a6fb5d89809907de92573e779666f3cad..16bbb8a8212497d9c44c81333ed2c0e689e0c5af:/src/xbt/config.c diff --git a/src/xbt/config.c b/src/xbt/config.c index 0798011d21..ff9ee32d4b 100644 --- a/src/xbt/config.c +++ b/src/xbt/config.c @@ -212,8 +212,7 @@ void xbt_cfgelm_free(void *data) * @param cb_rm callback function called when a value is removed */ -void -xbt_cfg_register(xbt_cfg_t * cfg, +void xbt_cfg_register(xbt_cfg_t * cfg, const char *name, const char *desc, e_xbt_cfgelm_type_t type, int min, int max, xbt_cfg_cb_t cb_set, xbt_cfg_cb_t cb_rm) @@ -465,7 +464,8 @@ static xbt_cfgelm_t xbt_cfgelm_get(xbt_cfg_t cfg, if (!res) { xbt_cfg_help(cfg); THROWF(not_found_error, 0, - "No registered variable '%s' in this config set", name); + "No registered variable '%s' in this config set. It is possible that this "\ + "configuration option has been renamed; please read the file ChangeLog carefully!", name); } xbt_assert(type == xbt_cfgelm_any || res->type == type, @@ -932,14 +932,14 @@ void xbt_cfg_set_boolean(xbt_cfg_t cfg, const char *name, const char *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 (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);