From a846b9415542cdaa8ba5d0f7efeadecb56ba7c2c Mon Sep 17 00:00:00 2001 From: navarrop Date: Thu, 17 Feb 2011 17:14:40 +0000 Subject: [PATCH 1/1] Remove unused include "simgrid_config.h" If need _XBT_WIN32 include gras_config.h" git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9658 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- examples/msg/actions/actions.c | 1 - src/msg/msg_actions.c | 1 - src/surf/random_mgr.c | 2 +- src/xbt/setset.c | 2 +- src/xbt/xbt_replay_trace_reader.c | 1 - tools/tesh/tesh.c | 16 +++++++--------- 6 files changed, 9 insertions(+), 14 deletions(-) diff --git a/examples/msg/actions/actions.c b/examples/msg/actions/actions.c index 35dabdf9eb..758ebf111e 100644 --- a/examples/msg/actions/actions.c +++ b/examples/msg/actions/actions.c @@ -9,7 +9,6 @@ #include "msg/msg.h" /* Yeah! If you want to use msg, you need to include msg/msg.h */ #include "simix/simix.h" /* semaphores for the barrier */ #include "xbt.h" /* calloc, printf */ -#include "simgrid_config.h" /* getline */ #include "instr/instr_private.h" void SIMIX_ctx_raw_factory_init(smx_context_factory_t *factory); diff --git a/src/msg/msg_actions.c b/src/msg/msg_actions.c index 04eae26215..3ef50ad769 100644 --- a/src/msg/msg_actions.c +++ b/src/msg/msg_actions.c @@ -4,7 +4,6 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "simgrid_config.h" /* getline */ #include "msg/private.h" #include "xbt/str.h" #include "xbt/dynar.h" diff --git a/src/surf/random_mgr.c b/src/surf/random_mgr.c index 4f48ae9863..f6783d2e65 100644 --- a/src/surf/random_mgr.c +++ b/src/surf/random_mgr.c @@ -6,7 +6,7 @@ #include "surf/random_mgr.h" #include "xbt/sysdep.h" -#include "simgrid_config.h" /*_XBT_WIN32*/ +#include "gras_config.h" /*_XBT_WIN32*/ #ifdef _XBT_WIN32 diff --git a/src/xbt/setset.c b/src/xbt/setset.c index 7ab1933f3a..79d25575e9 100644 --- a/src/xbt/setset.c +++ b/src/xbt/setset.c @@ -3,7 +3,7 @@ #include #include "setset_private.h" #include "xbt/sysdep.h" -#include "simgrid_config.h" /*_XBT_WIN32*/ +#include "gras_config.h" /*_XBT_WIN32*/ /*The function ffs doesn't exist for windows*/ #ifdef _XBT_WIN32 diff --git a/src/xbt/xbt_replay_trace_reader.c b/src/xbt/xbt_replay_trace_reader.c index aafd768c27..45b1a69a88 100644 --- a/src/xbt/xbt_replay_trace_reader.c +++ b/src/xbt/xbt_replay_trace_reader.c @@ -4,7 +4,6 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ #include "gras_config.h" -#include "simgrid_config.h" /* getline */ #include #include "xbt/sysdep.h" #include "xbt/log.h" diff --git a/tools/tesh/tesh.c b/tools/tesh/tesh.c index b8c5b1e796..7d5659e136 100644 --- a/tools/tesh/tesh.c +++ b/tools/tesh/tesh.c @@ -6,8 +6,6 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "simgrid_config.h" /* FILE for getline */ - /* specific to Borland Compiler */ #ifdef __BORLANDDC__ #pragma hdrstop @@ -85,7 +83,7 @@ static void handle_line(const char *filepos, char *line) } } -static void handle_suite(const char *filename, FILE * FICIN) +static void handle_suite(const char *filename, FILE * IN) { size_t len; int blankline; @@ -100,7 +98,7 @@ static void handle_suite(const char *filename, FILE * FICIN) buff = xbt_strbuff_new(); rctx = rctx_new(); - while (getline(&line, &len, FICIN) != -1) { + while (getline(&line, &len, IN) != -1) { line_num++; /* Count the line length while checking wheather it's blank */ @@ -190,7 +188,7 @@ static void parse_environ() int main(int argc, char *argv[]) { - FILE *FICIN = NULL; + FILE *IN = NULL; int i; char *suitename = NULL; struct sigaction newact; @@ -272,15 +270,15 @@ int main(int argc, char *argv[]) XBT_INFO("Test suite `%s'", suitename); testsuite_name = suitename; - FICIN = fopen(argv[i], "r"); - if (!FICIN) { + IN = fopen(argv[i], "r"); + if (!IN) { perror(bprintf("Impossible to open the suite file `%s'", argv[i])); XBT_ERROR("Test suite `%s': NOK (system error)", testsuite_name); rctx_armageddon(rctx, 1); } - handle_suite(suitename, FICIN); + handle_suite(suitename, IN); rctx_wait_bg(); - fclose(FICIN); + fclose(IN); XBT_INFO("Test suite `%s' OK", suitename); free(suitename); } -- 2.20.1