From: Martin Quinson Date: Tue, 8 Nov 2011 10:48:32 +0000 (+0100) Subject: also cleanup the field names of s_sg_platf_router_cbarg_t X-Git-Tag: exp_20120216~440 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/04c10dad7fa6089786021b0f8b4413f86bafd6fd?hp=fb17c31966c617a068f0d69d3a419041150d905d also cleanup the field names of s_sg_platf_router_cbarg_t Still manual, so atomic commits to avoid issues --- diff --git a/include/simgrid/platf.h b/include/simgrid/platf.h index a10f8846a2..3837ac9ad9 100644 --- a/include/simgrid/platf.h +++ b/include/simgrid/platf.h @@ -43,8 +43,8 @@ typedef struct { } s_sg_platf_host_cbarg_t, *sg_platf_host_cbarg_t; typedef struct { - const char* V_router_id; - const char* V_router_coord; + const char* id; + const char* coord; } s_sg_platf_router_cbarg_t, *sg_platf_router_cbarg_t; typedef struct { diff --git a/src/bindings/lua/lua_console.c b/src/bindings/lua/lua_console.c index 6749e65216..c62713fbe1 100644 --- a/src/bindings/lua/lua_console.c +++ b/src/bindings/lua/lua_console.c @@ -179,12 +179,12 @@ int console_add_router(lua_State* L) { lua_pushstring(L, "id"); lua_gettable(L, -2); - router.V_router_id = lua_tostring(L, -1); + router.id = lua_tostring(L, -1); lua_pop(L,1); lua_pushstring(L,"coord"); lua_gettable(L,-2); - router.V_router_coord = lua_tostring(L, -1); + router.coord = lua_tostring(L, -1); lua_pop(L,1); sg_platf_new_router(&router); diff --git a/src/instr/instr_routing.c b/src/instr/instr_routing.c index e764a6a38d..1eed752721 100644 --- a/src/instr/instr_routing.c +++ b/src/instr/instr_routing.c @@ -269,7 +269,7 @@ static void instr_routing_parse_start_host (sg_platf_host_cbarg_t host) static void instr_routing_parse_start_router (sg_platf_router_cbarg_t router) { container_t father = *(container_t*)xbt_dynar_get_ptr(currentContainer, xbt_dynar_length(currentContainer)-1); - newContainer (router->V_router_id, INSTR_ROUTER, father); + newContainer (router->id, INSTR_ROUTER, father); } static void instr_routing_parse_end_platform () diff --git a/src/surf/surf_routing.c b/src/surf/surf_routing.c index d81bfe508c..24f8467e32 100644 --- a/src/surf/surf_routing.c +++ b/src/surf/surf_routing.c @@ -132,24 +132,23 @@ static void parse_S_router(sg_platf_router_cbarg_t router) network_element_info_t info = NULL; if (current_routing->hierarchy == SURF_ROUTING_NULL) current_routing->hierarchy = SURF_ROUTING_BASE; - xbt_assert(!xbt_lib_get_or_null(as_router_lib,router->V_router_id, ROUTING_ASR_LEVEL), + xbt_assert(!xbt_lib_get_or_null(as_router_lib,router->id, ROUTING_ASR_LEVEL), "Reading a router, processing unit \"%s\" already exists", - router->V_router_id); + router->id); xbt_assert(current_routing->set_processing_unit, "no defined method \"set_processing_unit\" in \"%s\"", current_routing->name); - (*(current_routing->set_processing_unit)) (current_routing, - router->V_router_id); + (*(current_routing->set_processing_unit)) (current_routing, router->id); info = xbt_new0(s_network_element_info_t, 1); info->rc_component = current_routing; info->rc_type = SURF_NETWORK_ELEMENT_ROUTER; - xbt_lib_set(as_router_lib,router->V_router_id,ROUTING_ASR_LEVEL,(void *) info); + xbt_lib_set(as_router_lib,router->id,ROUTING_ASR_LEVEL,(void *) info); if (strcmp(A_surfxml_router_coordinates,"")) { if(!COORD_ASR_LEVEL) xbt_die("To use coordinates, you must set configuration 'coordinates' to 'yes'"); xbt_dynar_t ctn = xbt_str_split_str(A_surfxml_router_coordinates, " "); xbt_dynar_shrink(ctn, 0); - xbt_lib_set(as_router_lib,router->V_router_id,COORD_ASR_LEVEL,(void *) ctn); + xbt_lib_set(as_router_lib,router->id,COORD_ASR_LEVEL,(void *) ctn); } } @@ -159,8 +158,8 @@ static void parse_S_router(sg_platf_router_cbarg_t router) static void parse_S_router_lua(const char* router_id) { s_sg_platf_router_cbarg_t router; memset(&router,0,sizeof(router)); - router.V_router_id = router_id; - router.V_router_coord = ""; + router.id = router_id; + router.coord = ""; return parse_S_router(&router); } diff --git a/src/surf/surfxml_parse.c b/src/surf/surfxml_parse.c index 1f110ecf67..48cbb044af 100644 --- a/src/surf/surfxml_parse.c +++ b/src/surf/surfxml_parse.c @@ -301,8 +301,8 @@ void STag_surfxml_router(void){ s_sg_platf_router_cbarg_t router; memset(&router, 0, sizeof(router)); - router.V_router_id = A_surfxml_router_id; - router.V_router_coord = A_surfxml_router_coordinates; + router.id = A_surfxml_router_id; + router.coord = A_surfxml_router_coordinates; sg_platf_new_router(&router); }