From b91f70d7c653c348d1b7c2a33c17b8c759d21709 Mon Sep 17 00:00:00 2001 From: mquinson Date: Thu, 16 Dec 2004 13:03:07 +0000 Subject: [PATCH] You evil namespace polluter git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@664 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/include/surf/surf_parse.h | 6 +++--- src/surf/cpu.c | 6 +++--- src/surf/network.c | 16 ++++++++-------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/include/surf/surf_parse.h b/src/include/surf/surf_parse.h index d7347cd991..8aea81b594 100644 --- a/src/include/surf/surf_parse.h +++ b/src/include/surf/surf_parse.h @@ -26,9 +26,9 @@ typedef enum { #define MAX_STR_CONST 1024 extern char *surf_parse_text; -extern int line_pos; -extern int char_pos; -extern int tok_num; +extern int surf_line_pos; +extern int surf_char_pos; +extern int surf_tok_num; e_surf_token_t surf_parse(void); void find_section(const char *file, const char *section_name); diff --git a/src/surf/cpu.c b/src/surf/cpu.c index 1aa1daac17..be82ebb255 100644 --- a/src/surf/cpu.c +++ b/src/surf/cpu.c @@ -86,13 +86,13 @@ static void parse_cpu(void) surf_parse_trace(&power_trace); token = surf_parse(); /* state_initial */ - xbt_assert1((token == TOKEN_WORD), "Parse error line %d", line_pos); + xbt_assert1((token == TOKEN_WORD), "Parse error line %d", surf_line_pos); if (strcmp(surf_parse_text, "ON") == 0) state_initial = SURF_CPU_ON; else if (strcmp(surf_parse_text, "OFF") == 0) state_initial = SURF_CPU_OFF; else { - CRITICAL2("Invalid cpu state (line %d): %s neq ON or OFF\n", line_pos, + CRITICAL2("Invalid cpu state (line %d): %s neq ON or OFF\n", surf_line_pos, surf_parse_text); xbt_abort(); } @@ -120,7 +120,7 @@ static void parse_file(const char *file) if (token == TOKEN_WORD) parse_cpu(); else { - CRITICAL1("Parse error line %d\n", line_pos); + CRITICAL1("Parse error line %d\n", surf_line_pos); xbt_abort(); } } diff --git a/src/surf/network.c b/src/surf/network.c index d8e4e4f632..b88265c36d 100644 --- a/src/surf/network.c +++ b/src/surf/network.c @@ -125,13 +125,13 @@ static void parse_network_link(void) surf_parse_trace(&lat_trace); token = surf_parse(); /* state_initial */ - xbt_assert1((token == TOKEN_WORD), "Parse error line %d", line_pos); + xbt_assert1((token == TOKEN_WORD), "Parse error line %d", surf_line_pos); if (strcmp(surf_parse_text, "ON") == 0) state_initial = SURF_NETWORK_LINK_ON; else if (strcmp(surf_parse_text, "OFF") == 0) state_initial = SURF_NETWORK_LINK_OFF; else { - CRITICAL2("Invalid cpu state (line %d): %s neq ON or OFF\n", line_pos, + CRITICAL2("Invalid cpu state (line %d): %s neq ON or OFF\n", surf_line_pos, surf_parse_text); xbt_abort(); } @@ -160,11 +160,11 @@ static void parse_route(int fake) src_id = network_card_new(surf_parse_text); token = surf_parse(); - xbt_assert1((token == TOKEN_WORD), "Parse error line %d", line_pos); + 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", line_pos); + xbt_assert1((token == TOKEN_LP), "Parse error line %d", surf_line_pos); while ((token = surf_parse()) == TOKEN_WORD) { if (!fake) { @@ -173,7 +173,7 @@ static void parse_route(int fake) link_name[(nb_link) - 1] = xbt_strdup(surf_parse_text); } } - xbt_assert1((token == TOKEN_RP), "Parse error line %d", line_pos); + xbt_assert1((token == TOKEN_RP), "Parse error line %d", surf_line_pos); if (!fake) route_new(src_id, dst_id, link_name, nb_link); @@ -196,7 +196,7 @@ static void parse_file(const char *file) if (token == TOKEN_WORD) parse_network_link(); else { - CRITICAL1("Parse error line %d\n", line_pos); + CRITICAL1("Parse error line %d\n", surf_line_pos); xbt_abort(); } } @@ -215,7 +215,7 @@ static void parse_file(const char *file) if (token == TOKEN_WORD) parse_route(1); else { - CRITICAL1("Parse error line %d\n", line_pos); + CRITICAL1("Parse error line %d\n", surf_line_pos); xbt_abort(); } } @@ -236,7 +236,7 @@ static void parse_file(const char *file) if (token == TOKEN_WORD) parse_route(0); else { - CRITICAL1("Parse error line %d\n", line_pos); + CRITICAL1("Parse error line %d\n", surf_line_pos); xbt_abort(); } } -- 2.20.1