From 38e376d232ecb3d6a436a20c09019d1a13b0d42b Mon Sep 17 00:00:00 2001 From: David Brownell Date: Sun, 13 Dec 2009 12:52:23 -0800 Subject: [PATCH] target: further shrink Jim-awareness Don't include from target.h ... not everything which touches targets needs to be able to talk to Jim. Plus, most files include this header by another path. Also, switch the affected files to use the classic sequence for #included files: all first, then the "local_headers.h". This helps prevent growth of problematic layering, by minimizing entanglement. Signed-off-by: David Brownell --- src/target/target.c | 5 +++-- src/target/target.h | 3 +-- src/target/target_request.c | 5 +++-- src/target/testee.c | 4 +++- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/target/target.c b/src/target/target.c index 70130d912..740db0f18 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -33,15 +33,16 @@ #include "config.h" #endif +#include +#include + #include "target.h" #include "target_type.h" #include "target_request.h" #include "breakpoints.h" -#include #include "register.h" #include "trace.h" #include "image.h" -#include static int target_array2mem(Jim_Interp *interp, struct target *target, int argc, Jim_Obj *const *argv); diff --git a/src/target/target.h b/src/target/target.h index fededb956..4151c228b 100644 --- a/src/target/target.h +++ b/src/target/target.h @@ -27,7 +27,6 @@ #define TARGET_H #include -#include struct reg; struct trace; @@ -214,7 +213,7 @@ enum target_event struct target_event_action { enum target_event event; - Jim_Interp *interp; + struct Jim_Interp *interp; struct Jim_Obj *body; int has_percent; struct target_event_action *next; diff --git a/src/target/target_request.c b/src/target/target_request.c index fc0ba1ac0..d22b8a2b9 100644 --- a/src/target/target_request.c +++ b/src/target/target_request.c @@ -27,12 +27,13 @@ #include "config.h" #endif +#include +#include + #include "target.h" #include "target_request.h" #include "target_type.h" -#include #include "trace.h" -#include static int charmsg_mode = 0; diff --git a/src/target/testee.c b/src/target/testee.c index 991c64e85..280111a43 100644 --- a/src/target/testee.c +++ b/src/target/testee.c @@ -20,9 +20,11 @@ #ifdef HAVE_CONFIG_H #include "config.h" #endif + +#include + #include "target.h" #include "target_type.h" -#include #include "hello.h" static const struct command_registration testee_command_handlers[] = {