void STag_surfxml_host(void)
{
surfxml_call_cb_functions(STag_surfxml_host_cb_list);
+
}
void ETag_surfxml_host(void)
}
return;
}
+ surf_file_to_parse = surf_fopen(file, "r");
+ xbt_assert1((surf_file_to_parse), "Unable to open \"%s\"\n", file);
+
if (!surf_input_buffer_stack)
surf_input_buffer_stack = xbt_dynar_new(sizeof(YY_BUFFER_STATE), NULL);
if (!surf_file_to_parse_stack)
surf_file_to_parse_stack = xbt_dynar_new(sizeof(FILE *), NULL);
- surf_file_to_parse = surf_fopen(file, "r");
- xbt_assert1((surf_file_to_parse), "Unable to open \"%s\"\n", file);
surf_input_buffer = surf_parse__create_buffer(surf_file_to_parse, 10);
surf_parse__switch_to_buffer(surf_input_buffer);
surf_parse_lineno = 1;
void parse_platform_file(const char *file)
{
+ int parse_status;
surf_parse_open(file);
init_data();
- xbt_assert1((!(*surf_parse) ()), "Parse error in %s", file);
+ parse_status = surf_parse();
free_data();
surf_parse_close();
+ if (parse_status)
+ xbt_dict_free(&random_data_list);
+ xbt_assert1(!parse_status, "Parse error in %s", file);
}
/* Functions to bypass route tag. Used by the route:multi tag */
}
static void parse_host_foreach(void){
+
xbt_dynar_t names = NULL;
unsigned int cpt = 0;
char *name;
random_std_deviation);
xbt_dict_set(random_data_list, random_id, (void *) random, NULL);
}
+
+
+/* Init Host bypassing XML*/
+void init_host_bypass(char* name,double power)
+{
+ surf_cpu_im_init_bypass(name,power);
+}