summaryrefslogtreecommitdiff
path: root/src/target
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2009-11-16 00:35:05 -0800
committerDavid Brownell <dbrownell@users.sourceforge.net>2009-11-16 00:35:05 -0800
commitdb094c2e60176b3c63ce788159b04a7024ad1010 (patch)
tree21829e96c035889023c451e02b1243678505ae60 /src/target
parentaa7c449600d6f6d634f587de6091421a1a877af5 (diff)
downloadopenocd+libswd-db094c2e60176b3c63ce788159b04a7024ad1010.tar.gz
openocd+libswd-db094c2e60176b3c63ce788159b04a7024ad1010.tar.bz2
openocd+libswd-db094c2e60176b3c63ce788159b04a7024ad1010.tar.xz
openocd+libswd-db094c2e60176b3c63ce788159b04a7024ad1010.zip
target: don't implicitly include "algorithm.h"
Most files in the tree seem to have ended up including this, and *quite* needlessly ... only code implementing or using downloadable algorithms actually needs these declarations. So take it out of the header files which included it, and put it in files which use it ... reduce needless interdependencies. Also: "algorithm.h" doesn't need to include "types.h" again; it already comes from a different header. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Diffstat (limited to 'src/target')
-rw-r--r--src/target/algorithm.h2
-rw-r--r--src/target/arm11.c1
-rw-r--r--src/target/arm7_9_common.c1
-rw-r--r--src/target/armv4_5.c1
-rw-r--r--src/target/armv7m.c1
-rw-r--r--src/target/target.h3
6 files changed, 6 insertions, 3 deletions
diff --git a/src/target/algorithm.h b/src/target/algorithm.h
index 80f081db..abb8ecfc 100644
--- a/src/target/algorithm.h
+++ b/src/target/algorithm.h
@@ -20,8 +20,6 @@
#ifndef ALGORITHM_H
#define ALGORITHM_H
-#include "types.h"
-
enum param_direction
{
PARAM_IN,
diff --git a/src/target/arm11.c b/src/target/arm11.c
index f4e2c0d5..cdeb4200 100644
--- a/src/target/arm11.c
+++ b/src/target/arm11.c
@@ -33,6 +33,7 @@
#include "arm_simulator.h"
#include "time_support.h"
#include "target_type.h"
+#include "algorithm.h"
#if 0
diff --git a/src/target/arm7_9_common.c b/src/target/arm7_9_common.c
index b07111eb..76c79c3a 100644
--- a/src/target/arm7_9_common.c
+++ b/src/target/arm7_9_common.c
@@ -36,6 +36,7 @@
#include "arm7_9_common.h"
#include "time_support.h"
#include "arm_simulator.h"
+#include "algorithm.h"
/**
diff --git a/src/target/armv4_5.c b/src/target/armv4_5.c
index 47b32add..e6e0bd7e 100644
--- a/src/target/armv4_5.c
+++ b/src/target/armv4_5.c
@@ -31,6 +31,7 @@
#include "breakpoints.h"
#include "arm_disassembler.h"
#include "binarybuffer.h"
+#include "algorithm.h"
char* armv4_5_core_reg_list[] =
diff --git a/src/target/armv7m.c b/src/target/armv7m.c
index 6c6a9ec6..3f9e7f55 100644
--- a/src/target/armv7m.c
+++ b/src/target/armv7m.c
@@ -36,6 +36,7 @@
#include "breakpoints.h"
#include "armv7m.h"
+#include "algorithm.h"
#define ARRAY_SIZE(x) ((int)(sizeof(x)/sizeof((x)[0])))
diff --git a/src/target/target.h b/src/target/target.h
index 06105ee6..75bc4f02 100644
--- a/src/target/target.h
+++ b/src/target/target.h
@@ -28,7 +28,6 @@
#include <stddef.h>
-#include "algorithm.h"
#include "command.h"
struct reg;
@@ -36,6 +35,8 @@ struct trace;
struct command_context;
struct breakpoint;
struct watchpoint;
+struct mem_param;
+struct reg_param;
/**