From c4978cdc959fa1fd3fb1a7223d05160f6f01b7ba Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Fri, 4 Nov 2011 14:32:26 +0100 Subject: [PATCH] normalize some type names --- src/include/surf/surfxml_parse_values.h | 40 ++++++++++++------------- src/surf/surf_routing.c | 10 +++---- src/surf/surfxml_parse.c | 10 +++---- src/surf/surfxml_parseplatf.c | 10 +++---- 4 files changed, 35 insertions(+), 35 deletions(-) diff --git a/src/include/surf/surfxml_parse_values.h b/src/include/surf/surfxml_parse_values.h index 673c8109b3..0decdd5d91 100644 --- a/src/include/surf/surfxml_parse_values.h +++ b/src/include/surf/surfxml_parse_values.h @@ -7,8 +7,8 @@ #ifndef SURFXML_PARSE_VALUES_H_ #define SURFXML_PARSE_VALUES_H_ -typedef struct s_peer *peer_t; -typedef struct s_peer { +typedef struct s_surf_parsing_peer_arg *surf_parsing_peer_arg_t; +typedef struct s_surf_parsing_peer_arg { char* V_peer_id; char* V_peer_power; char* V_peer_bw_in; @@ -17,10 +17,10 @@ typedef struct s_peer { char* V_peer_coord; char* V_peer_availability_trace; char* V_peer_state_trace; -} s_peer_t; +} s_surf_parsing_peer_arg_t; -typedef struct s_link *link_t; -typedef struct s_link { +typedef struct s_surf_parsing_link_arg *surf_parsing_link_arg_t; +typedef struct s_surf_parsing_link_arg { char* V_link_id; double V_link_bandwidth; tmgr_trace_t V_link_bandwidth_file; @@ -30,10 +30,10 @@ typedef struct s_link { tmgr_trace_t V_link_state_file; int V_link_sharing_policy; int V_policy_initial_link; -} s_link_t; +} s_surf_parsing_link_arg_t; -typedef struct s_cluster *cluster_t; -typedef struct s_cluster { +typedef struct s_surf_parsing_cluster_arg *surf_parsing_cluster_arg_t; +typedef struct s_surf_parsing_cluster_arg { char* V_cluster_id; char* V_cluster_prefix; char* V_cluster_suffix; @@ -49,16 +49,16 @@ typedef struct s_cluster { int V_cluster_bb_sharing_policy; char* V_cluster_availability_file; char* V_cluster_state_file; -} s_cluster_t; +} s_surf_parsing_cluster_arg_t; -typedef struct s_router *router_t; -typedef struct s_router { +typedef struct s_surf_parsing_router_arg *surf_parsing_router_arg_t; +typedef struct s_surf_parsing_router_arg { char* V_router_id; char* V_router_coord; -} s_router_t; +} s_surf_parsing_router_arg_t; -typedef struct s_hostSG *hostSG_t; -typedef struct s_hostSG { +typedef struct s_surf_parsing_host_arg *surf_parsing_host_arg_t; +typedef struct s_surf_parsing_host_arg { char* V_host_id; //id double V_host_power_peak; //power int V_host_core; //core @@ -67,13 +67,13 @@ typedef struct s_hostSG { e_surf_resource_state_t V_host_state_initial; //state tmgr_trace_t V_host_state_trace; //state file const char* V_host_coord; -} s_hostSG_t; +} s_surf_parsing_host_arg_t; -extern hostSG_t struct_host; -extern router_t struct_router; -extern cluster_t struct_cluster; -extern peer_t struct_peer; -extern link_t struct_lnk; +extern surf_parsing_host_arg_t struct_host; +extern surf_parsing_router_arg_t struct_router; +extern surf_parsing_cluster_arg_t struct_cluster; +extern surf_parsing_peer_arg_t struct_peer; +extern surf_parsing_link_arg_t struct_lnk; void STag_surfxml_host_cluster(void); void STag_surfxml_link_cluster(void); diff --git a/src/surf/surf_routing.c b/src/surf/surf_routing.c index 471de49609..454451435f 100644 --- a/src/surf/surf_routing.c +++ b/src/surf/surf_routing.c @@ -1551,7 +1551,7 @@ void routing_parse_Scluster(void) link_id = bprintf("%s_link_%d", struct_cluster->V_cluster_id, start); XBT_DEBUG("", host_id, struct_cluster->S_cluster_power); - struct_host = xbt_new0(s_hostSG_t, 1); + struct_host = xbt_new0(s_surf_parsing_host_arg_t, 1); struct_host->V_host_id = host_id; if(strcmp(struct_cluster->V_cluster_availability_file,"")){ xbt_dict_set(patterns, "radical", bprintf("%d", start), xbt_free); @@ -1593,7 +1593,7 @@ void routing_parse_Scluster(void) XBT_DEBUG("", link_id,struct_cluster->S_cluster_bw, struct_cluster->S_cluster_lat); - struct_lnk = xbt_new0(s_link_t, 1); + struct_lnk = xbt_new0(s_surf_parsing_link_arg_t, 1); struct_lnk->V_link_id = link_id; struct_lnk->V_link_bandwidth = struct_cluster->S_cluster_bw; struct_lnk->V_link_latency = struct_cluster->S_cluster_lat; @@ -1633,7 +1633,7 @@ void routing_parse_Scluster(void) A_surfxml_host_state = A_surfxml_host_state_ON; XBT_DEBUG("", host_id, struct_cluster->S_cluster_power); - struct_host = xbt_new0(s_hostSG_t, 1); + struct_host = xbt_new0(s_surf_parsing_host_arg_t, 1); struct_host->V_host_id = host_id; if(strcmp(struct_cluster->V_cluster_availability_file,"")){ xbt_dict_set(patterns, "radical", bprintf("%d", i), xbt_free); @@ -1675,7 +1675,7 @@ void routing_parse_Scluster(void) XBT_DEBUG("", link_id,struct_cluster->S_cluster_bw, struct_cluster->S_cluster_lat); - struct_lnk = xbt_new0(s_link_t, 1); + struct_lnk = xbt_new0(s_surf_parsing_link_arg_t, 1); struct_lnk->V_link_id = link_id; struct_lnk->V_link_bandwidth = struct_cluster->S_cluster_bw; struct_lnk->V_link_latency = struct_cluster->S_cluster_lat; @@ -1729,7 +1729,7 @@ void routing_parse_Scluster(void) if(cluster_bb_sharing_policy == A_surfxml_cluster_bb_sharing_policy_FATPIPE) {A_surfxml_link_sharing_policy = A_surfxml_link_sharing_policy_FATPIPE;} - struct_lnk = xbt_new0(s_link_t, 1); + struct_lnk = xbt_new0(s_surf_parsing_link_arg_t, 1); struct_lnk->V_link_id = link_backbone; struct_lnk->V_link_bandwidth = struct_cluster->S_cluster_bb_bw; struct_lnk->V_link_latency = struct_cluster->S_cluster_bb_lat; diff --git a/src/surf/surfxml_parse.c b/src/surf/surfxml_parse.c index 151593425f..722d4518f8 100644 --- a/src/surf/surfxml_parse.c +++ b/src/surf/surfxml_parse.c @@ -297,7 +297,7 @@ void STag_surfxml_platform(void) void STag_surfxml_host(void){ // XBT_INFO("STag_surfxml_host [%s]",A_surfxml_host_id); - struct_host = xbt_new0(s_hostSG_t, 1); + struct_host = xbt_new0(s_surf_parsing_host_arg_t, 1); struct_host->V_host_id = xbt_strdup(A_surfxml_host_id); struct_host->V_host_power_peak = get_cpu_power(A_surfxml_host_power); surf_parse_get_double(&(struct_host->V_host_power_scale), A_surfxml_host_availability); @@ -324,7 +324,7 @@ void ETag_surfxml_host(void){ } void STag_surfxml_router(void){ - struct_router = xbt_new0(s_router_t, 1); + struct_router = xbt_new0(s_surf_parsing_router_arg_t, 1); struct_router->V_router_id = xbt_strdup(A_surfxml_router_id); struct_router->V_router_coord = xbt_strdup(A_surfxml_router_coordinates); surfxml_call_cb_functions(STag_surfxml_router_cb_list); @@ -339,7 +339,7 @@ void ETag_surfxml_router(void){ void STag_surfxml_cluster(void){ surf_parse_models_setup(); /* ensure that the models are created after the last tag. See comment in simgrid.dtd */ - struct_cluster = xbt_new0(s_cluster_t, 1); + struct_cluster = xbt_new0(s_surf_parsing_cluster_arg_t, 1); struct_cluster->V_cluster_id = xbt_strdup(A_surfxml_cluster_id); struct_cluster->V_cluster_prefix = xbt_strdup(A_surfxml_cluster_prefix); struct_cluster->V_cluster_suffix = xbt_strdup(A_surfxml_cluster_suffix); @@ -383,7 +383,7 @@ void ETag_surfxml_cluster(void){ void STag_surfxml_peer(void){ surf_parse_models_setup(); /* ensure that the models are created after the last tag. See comment in simgrid.dtd */ - struct_peer = xbt_new0(s_peer_t, 1); + struct_peer = xbt_new0(s_surf_parsing_peer_arg_t, 1); struct_peer->V_peer_id = xbt_strdup(A_surfxml_peer_id); struct_peer->V_peer_power = xbt_strdup(A_surfxml_peer_power); struct_peer->V_peer_bw_in = xbt_strdup(A_surfxml_peer_bw_in); @@ -407,7 +407,7 @@ void ETag_surfxml_peer(void){ xbt_free(struct_peer); } void STag_surfxml_link(void){ - struct_lnk = xbt_new0(s_link_t, 1); + struct_lnk = xbt_new0(s_surf_parsing_link_arg_t, 1); struct_lnk->V_link_id = xbt_strdup(A_surfxml_link_id); surf_parse_get_double(&(struct_lnk->V_link_bandwidth),A_surfxml_link_bandwidth); struct_lnk->V_link_bandwidth_file = tmgr_trace_new(A_surfxml_link_bandwidth_file); diff --git a/src/surf/surfxml_parseplatf.c b/src/surf/surfxml_parseplatf.c index 23865b4a37..202fbe1b6c 100644 --- a/src/surf/surfxml_parseplatf.c +++ b/src/surf/surfxml_parseplatf.c @@ -52,11 +52,11 @@ void surfxml_bufferstack_pop(int new) * Pass arguments to parsing callback as structures to save some time (and allow callbacks to ignore some) */ -hostSG_t struct_host = NULL; -router_t struct_router = NULL; -cluster_t struct_cluster = NULL; -peer_t struct_peer = NULL; -link_t struct_lnk = NULL; +surf_parsing_host_arg_t struct_host = NULL; +surf_parsing_router_arg_t struct_router = NULL; +surf_parsing_cluster_arg_t struct_cluster = NULL; +surf_parsing_peer_arg_t struct_peer = NULL; +surf_parsing_link_arg_t struct_lnk = NULL; /* -- 2.20.1