Audit and eliminate redundant #include directives from src/server.
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Mon, 11 May 2009 04:22:15 +0000 (04:22 +0000)
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Mon, 11 May 2009 04:22:15 +0000 (04:22 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@1709 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/server/gdb_server.c
src/server/gdb_server.h
src/server/httpd.c
src/server/server.c
src/server/server.h
src/server/tcl_server.c
src/server/telnet_server.c

index 7ba5281..4537c2d 100644 (file)
 #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 <string.h>
-#include <errno.h>
-#include <unistd.h>
-#include <stdlib.h>
 
 #if 0
 #define _DEBUG_GDB_IO_
index 691cebf..d9d3106 100644 (file)
@@ -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;
index 6a4302f..6d98515 100644 (file)
 #include "config.h"
 #endif
 
-#include "replacements.h"
-
-#include "server.h"
-
-#include "log.h"
 #include "telnet_server.h"
 #include "target.h"
 
-#include <command.h>
-#include <string.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <unistd.h>
-#include <fcntl.h>
+#include <microhttpd.h>
 #include <pthread.h>
 #include <signal.h>
 
-#include <sys/select.h>
-#include <sys/socket.h>
-#include <microhttpd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-
 #define PAGE_NOT_FOUND "<html><head><title>File not found</title></head><body>File not found</body></html>"
 
 int loadFile(const char *name, void **data, size_t *len);
index 2c5f643..0840c52 100644 (file)
 #include "config.h"
 #endif
 
-#include "replacements.h"
-
 #include "server.h"
-
-#include "log.h"
-#include "telnet_server.h"
 #include "target.h"
 
-#include <command.h>
-#include <string.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <unistd.h>
-#include <fcntl.h>
 #include <signal.h>
+
 #ifndef _WIN32
 #include <netinet/tcp.h>
 #endif
 
+
 service_t *services = NULL;
 
 /* shutdown_openocd == 1: exit the main event loop, and quit the debugger */
index 2268c31..bfb8620 100644 (file)
 #ifndef SERVER_H
 #define SERVER_H
 
-#include "command.h"
-#include "binarybuffer.h"
-#include "replacements.h"
+#include "log.h"
+
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
 
 enum connection_type
 {
index 070f933..b5ca3c9 100644 (file)
 #include "config.h"
 #endif
 
-#include <stdarg.h>
 #include "tcl_server.h"
 
-#include "log.h"
-#include "command.h"
-
-#include <stdlib.h>
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
-#include <ctype.h>
 
 #define TCL_SERVER_VERSION     "TCL Server 0.1"
 #define TCL_MAX_LINE           (4096)
index 95dfce1..16662bb 100644 (file)
 #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 <stdlib.h>
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
-#include <ctype.h>
-
 static unsigned short telnet_port = 0;
 
 int handle_exit_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);