- int src_id = -1;
- int dst_id = -1;
- int nb_link = 0;
- char **link_name = NULL;
- e_surf_token_t token;
-
- src_id = network_card_new(surf_parse_text);
-
- token = surf_parse();
- xbt_assert1((token == TOKEN_WORD), "Parse error line %d", surf_line_pos);
- dst_id = network_card_new(surf_parse_text);
-
- token = surf_parse();
- xbt_assert1((token == TOKEN_LP), "Parse error line %d", surf_line_pos);
-
- while ((token = surf_parse()) == TOKEN_WORD) {
- if (!fake) {
- nb_link++;
- link_name = xbt_realloc(link_name, (nb_link) * sizeof(char *));
- link_name[(nb_link) - 1] = xbt_strdup(surf_parse_text);
- }
- }
- xbt_assert1((token == TOKEN_RP), "Parse error line %d", surf_line_pos);