From 164cb6d04eb582207575c4b8f42c8d1eb4aa2480 Mon Sep 17 00:00:00 2001 From: zwelch Date: Mon, 11 May 2009 04:22:15 +0000 Subject: [PATCH] Audit and eliminate redundant #include directives from src/server. git-svn-id: svn://svn.berlios.de/openocd/trunk@1709 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/server/gdb_server.c | 18 ++++-------------- src/server/gdb_server.h | 6 +++--- src/server/httpd.c | 19 +------------------ src/server/server.c | 13 ++----------- src/server/server.h | 8 +++++--- src/server/tcl_server.c | 9 --------- src/server/telnet_server.c | 13 ------------- 7 files changed, 15 insertions(+), 71 deletions(-) diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index 7ba5281b..4537c2d2 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -27,24 +27,14 @@ #include "config.h" #endif -#include "replacements.h" - #include "gdb_server.h" - +#include "target_request.h" +#include "register.h" #include "server.h" -#include "log.h" -#include "binarybuffer.h" -#include "jtag.h" -#include "breakpoints.h" #include "flash.h" -#include "target.h" -#include "target_request.h" -#include "configuration.h" +#include "image.h" +#include "jtag.h" -#include -#include -#include -#include #if 0 #define _DEBUG_GDB_IO_ diff --git a/src/server/gdb_server.h b/src/server/gdb_server.h index 691cebf4..d9d31067 100644 --- a/src/server/gdb_server.h +++ b/src/server/gdb_server.h @@ -27,8 +27,8 @@ #define GDB_SERVER_H #include "target.h" -#include "server.h" -#include "image.h" + +struct image_s; #define GDB_BUFFER_SIZE 16384 @@ -39,7 +39,7 @@ typedef struct gdb_connection_s int buf_cnt; int ctrl_c; enum target_state frontend_state; - image_t *vflash_image; + struct image_s *vflash_image; int closed; int busy; int noack_mode; diff --git a/src/server/httpd.c b/src/server/httpd.c index 6a4302f9..6d985153 100644 --- a/src/server/httpd.c +++ b/src/server/httpd.c @@ -27,30 +27,13 @@ #include "config.h" #endif -#include "replacements.h" - -#include "server.h" - -#include "log.h" #include "telnet_server.h" #include "target.h" -#include -#include -#include -#include -#include -#include +#include #include #include -#include -#include -#include -#include -#include -#include - #define PAGE_NOT_FOUND "File not foundFile not found" int loadFile(const char *name, void **data, size_t *len); diff --git a/src/server/server.c b/src/server/server.c index 2c5f643e..0840c523 100644 --- a/src/server/server.c +++ b/src/server/server.c @@ -27,25 +27,16 @@ #include "config.h" #endif -#include "replacements.h" - #include "server.h" - -#include "log.h" -#include "telnet_server.h" #include "target.h" -#include -#include -#include -#include -#include -#include #include + #ifndef _WIN32 #include #endif + service_t *services = NULL; /* shutdown_openocd == 1: exit the main event loop, and quit the debugger */ diff --git a/src/server/server.h b/src/server/server.h index 2268c310..bfb86200 100644 --- a/src/server/server.h +++ b/src/server/server.h @@ -26,9 +26,11 @@ #ifndef SERVER_H #define SERVER_H -#include "command.h" -#include "binarybuffer.h" -#include "replacements.h" +#include "log.h" + +#ifdef HAVE_NETINET_IN_H +#include +#endif enum connection_type { diff --git a/src/server/tcl_server.c b/src/server/tcl_server.c index 070f9336..b5ca3c96 100644 --- a/src/server/tcl_server.c +++ b/src/server/tcl_server.c @@ -21,17 +21,8 @@ #include "config.h" #endif -#include #include "tcl_server.h" -#include "log.h" -#include "command.h" - -#include -#include -#include -#include -#include #define TCL_SERVER_VERSION "TCL Server 0.1" #define TCL_MAX_LINE (4096) diff --git a/src/server/telnet_server.c b/src/server/telnet_server.c index 95dfce16..16662bbd 100644 --- a/src/server/telnet_server.c +++ b/src/server/telnet_server.c @@ -27,22 +27,9 @@ #include "config.h" #endif -#include "replacements.h" - #include "telnet_server.h" - -#include "server.h" -#include "log.h" -#include "command.h" -#include "target.h" #include "target_request.h" -#include -#include -#include -#include -#include - static unsigned short telnet_port = 0; int handle_exit_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); -- 2.39.5