X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/5e61205077b453d1460c7008d1af3a68e6667db6..69df130a50b94f86e4ef3fae61b68bfa2bbaccca:/src/xbt/config.c?ds=sidebyside diff --git a/src/xbt/config.c b/src/xbt/config.c index 0e532308ef..13df108f0f 100644 --- a/src/xbt/config.c +++ b/src/xbt/config.c @@ -18,12 +18,6 @@ #include "xbt/peer.h" #include "xbt/config.h" /* prototypes of this module */ -#include "surf/surf_routing.h" /* COORD_HOST_LEVEL and COORD_ASR_LEVEL */ - -xbt_lib_t host_lib; -int COORD_HOST_LEVEL; //Coordinates level -xbt_lib_t as_router_lib; -int COORD_ASR_LEVEL; //Coordinates level XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_cfg, xbt, "configuration support"); @@ -521,7 +515,8 @@ void xbt_cfg_set_vargs(xbt_cfg_t cfg, const char *name, va_list pa) TRY { type = xbt_cfg_get_type(cfg, name); - } CATCH(e) { + } + CATCH(e) { if (e.category == not_found_error) { xbt_ex_free(e); THROWF(not_found_error, 0, @@ -594,7 +589,7 @@ void xbt_cfg_set_parse(xbt_cfg_t cfg, const char *options) double d; char *str; - xbt_cfgelm_t variable = NULL; + volatile xbt_cfgelm_t variable = NULL; char *optionlist_cpy; char *option, *name, *val; @@ -656,18 +651,6 @@ void xbt_cfg_set_parse(xbt_cfg_t cfg, const char *options) } *(val++) = '\0'; - if (!strcmp(name,"coordinates")){ - if(!strcmp(val,"yes") && !COORD_HOST_LEVEL){ - XBT_INFO("Configuration change: Set '%s' to '%s'", name, val); - COORD_HOST_LEVEL = xbt_lib_add_level(host_lib,xbt_dynar_free_voidp); - COORD_ASR_LEVEL = xbt_lib_add_level(as_router_lib,xbt_dynar_free_voidp); - free(optionlist_cpy); - return; - } - if(strcmp(val,"yes")) - xbt_die("Setting CMD prop coordinates must be \"yes\""); - } - if (strncmp(name, "contexts/", strlen("contexts/"))) XBT_INFO("Configuration change: Set '%s' to '%s'", name, val); @@ -737,7 +720,7 @@ void xbt_cfg_set_parse(xbt_cfg_t cfg, const char *options) name); } } - CATCH(e) { + CATCH_ANONYMOUS { free(optionlist_cpy); RETHROW; } @@ -1150,7 +1133,8 @@ void xbt_cfg_empty(xbt_cfg_t cfg, const char *name) TRY { variable = xbt_dict_get((xbt_dict_t) cfg, name); - } CATCH(e) { + } + CATCH(e) { if (e.category != not_found_error) RETHROW; @@ -1311,7 +1295,8 @@ xbt_dynar_t xbt_cfg_get_dynar(xbt_cfg_t cfg, const char *name) TRY { variable = xbt_dict_get((xbt_dict_t) cfg, name); - } CATCH(e) { + } + CATCH(e) { if (e.category == not_found_error) { xbt_ex_free(e); THROWF(not_found_error, 0, @@ -1490,7 +1475,8 @@ XBT_TEST_UNIT("use", test_config_use, "Data retrieving tests") TRY { xbt_cfg_set_parse(myset, "color:blue"); - } CATCH(e) { + } + CATCH(e) { if (e.category != not_found_error) xbt_test_exception(e); xbt_ex_free(e);