From 8a5b25790f064c408d747c9f087c4d45207fc3e4 Mon Sep 17 00:00:00 2001 From: zwelch Date: Mon, 11 May 2009 03:59:02 +0000 Subject: Audit and eliminate redundant helper #include directives. git-svn-id: svn://svn.berlios.de/openocd/trunk@1706 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/helper/binarybuffer.c | 5 ----- src/helper/command.c | 10 +--------- src/helper/command.h | 19 +++++++++---------- src/helper/configuration.c | 5 ----- src/helper/configuration.h | 1 - src/helper/fileio.c | 11 ----------- src/helper/fileio.h | 9 +-------- src/helper/log.c | 8 -------- src/helper/log.h | 2 -- src/helper/options.c | 7 ------- src/helper/time_support.c | 3 --- 11 files changed, 11 insertions(+), 69 deletions(-) (limited to 'src') diff --git a/src/helper/binarybuffer.c b/src/helper/binarybuffer.c index ab8218ca..87b9fa79 100644 --- a/src/helper/binarybuffer.c +++ b/src/helper/binarybuffer.c @@ -24,12 +24,7 @@ #include "config.h" #endif -#include -#include - -#include "types.h" #include "log.h" - #include "binarybuffer.h" const unsigned char bit_reverse_table256[] = diff --git a/src/helper/command.c b/src/helper/command.c index ecab9bdc..cb576bb3 100644 --- a/src/helper/command.c +++ b/src/helper/command.c @@ -30,22 +30,14 @@ #include "config.h" #endif -#include "replacements.h" +// @todo the inclusion of target.h here is a layering violation #include "target.h" #include "command.h" #include "configuration.h" - #include "log.h" #include "time_support.h" #include "jim-eventloop.h" -#include -#include -#include -#include -#include -#include -#include int fast_and_dangerous = 0; Jim_Interp *interp = NULL; diff --git a/src/helper/command.h b/src/helper/command.h index 49609a68..5fc0a283 100644 --- a/src/helper/command.h +++ b/src/helper/command.h @@ -23,7 +23,16 @@ #ifndef COMMAND_H #define COMMAND_H +/* Integrate the JIM TCL interpretor into the command processing. */ +#if BUILD_ECOSBOARD #include +#include +/* Jim is provied by eCos */ +#include +#else +#define JIM_EMBEDDED +#include "jim.h" +#endif enum command_mode { @@ -87,16 +96,6 @@ extern void process_jim_events(void); extern int fast_and_dangerous; -/* Integrate the JIM TCL interpretor into the command processing. */ -#include -#if BUILD_ECOSBOARD -/* Jim is provied by eCos */ -#include -#else -#define JIM_EMBEDDED -#include "jim.h" -#endif - extern Jim_Interp *interp; void register_jim(command_context_t *context, const char *name, int (*cmd)(Jim_Interp *interp, int argc, Jim_Obj *const *argv), const char *help); diff --git a/src/helper/configuration.c b/src/helper/configuration.c index e33a2e16..d1395e6a 100644 --- a/src/helper/configuration.c +++ b/src/helper/configuration.c @@ -24,14 +24,9 @@ #include "config.h" #endif -#include "types.h" -#include "command.h" #include "configuration.h" #include "log.h" -#include -#include -#include static size_t num_config_files; static char** config_file_names; diff --git a/src/helper/configuration.h b/src/helper/configuration.h index 109bd100..e75c7030 100644 --- a/src/helper/configuration.h +++ b/src/helper/configuration.h @@ -24,7 +24,6 @@ #define CONFIGURATION_H #include "command.h" -#include "types.h" extern int parse_cmdline_args(struct command_context_s *cmd_ctx, int argc, char *argv[]); extern int parse_config_file(struct command_context_s *cmd_ctx); diff --git a/src/helper/fileio.c b/src/helper/fileio.c index 070c0ac5..3a111525 100644 --- a/src/helper/fileio.c +++ b/src/helper/fileio.c @@ -27,21 +27,10 @@ #include "config.h" #endif -#include "types.h" -#include "replacements.h" #include "log.h" #include "configuration.h" - #include "fileio.h" -#include -#include -#include -#include -#include -#include -#include - static inline int fileio_open_local(fileio_t *fileio) { char access[4]; diff --git a/src/helper/fileio.h b/src/helper/fileio.h index c764082e..36e749b2 100644 --- a/src/helper/fileio.h +++ b/src/helper/fileio.h @@ -28,14 +28,7 @@ #define FILEIO_MAX_ERROR_STRING (128) -#include "types.h" - -#include -#include -#include -#include -#include -#include +#include "replacements.h" enum fileio_type { diff --git a/src/helper/log.c b/src/helper/log.c index b6bb3479..794f4548 100644 --- a/src/helper/log.c +++ b/src/helper/log.c @@ -27,18 +27,10 @@ #include "config.h" #endif -#include "replacements.h" - #include "log.h" -#include "configuration.h" #include "time_support.h" -#include "command.h" #include "server.h" -#include -#include -#include -#include #include #ifdef _DEBUG_FREE_SPACE_ diff --git a/src/helper/log.h b/src/helper/log.h index a790018f..4f781991 100644 --- a/src/helper/log.h +++ b/src/helper/log.h @@ -29,8 +29,6 @@ #include "replacements.h" #include "command.h" -#include - /* logging priorities * LOG_LVL_SILENT - turn off all output. In lieu of try+catch this can be used as a * feeble ersatz. diff --git a/src/helper/options.c b/src/helper/options.c index 109419b3..801bd11b 100644 --- a/src/helper/options.c +++ b/src/helper/options.c @@ -24,18 +24,11 @@ #include "config.h" #endif -#include "replacements.h" - -#include "types.h" -#include "command.h" #include "configuration.h" #include "log.h" #include "server.h" -#include -#include #include -#include static int help_flag, version_flag; diff --git a/src/helper/time_support.c b/src/helper/time_support.c index bc52e9ca..7a9a8001 100644 --- a/src/helper/time_support.c +++ b/src/helper/time_support.c @@ -27,12 +27,9 @@ #include "config.h" #endif -#include "replacements.h" #include "time_support.h" #include "log.h" -#include - /* calculate difference between two struct timeval values */ int timeval_subtract(struct timeval *result, struct timeval *x, struct timeval *y) -- cgit v1.2.3