Only include root.h where it is actually needed.
[bpt/guile.git] / libguile / gdbint.c
index 647e385..52df23c 100644 (file)
@@ -60,6 +60,9 @@
 #include "eval.h"
 #include "chars.h"
 #include "modules.h"
+#include "ports.h"
+#include "root.h"
+#include "strings.h"
 
 #include "gdbint.h"
 \f
  * debugger.
  */
 #define SCM_BEGIN_FOREIGN_BLOCK \
-{ \
+do { \
   old_ints = scm_ints_disabled; scm_ints_disabled = 1; \
   old_gc = scm_block_gc; scm_block_gc = 1; \
   scm_print_carefully_p = 1; \
-} \
+} while (0)
 
 
 #define SCM_END_FOREIGN_BLOCK \
-{ \
+do { \
   scm_print_carefully_p = 0; \
   scm_block_gc = old_gc; \
   scm_ints_disabled = old_ints; \
-} \
+} while (0)
 
 
 #define RESET_STRING { gdb_output_length = 0; }
 
 #define SEND_STRING(str) \
-{ \
+do { \
   gdb_output = str; \
   gdb_output_length = strlen (str); \
-} \
+} while (0)
 
 
 /* {Gdb interface}
@@ -163,8 +166,7 @@ remark_port (SCM port)
 
 
 int
-gdb_maybe_valid_type_p (value)
-     SCM value;
+gdb_maybe_valid_type_p (SCM value)
 {
   if (SCM_IMP (value) || scm_cellp (value))
     return scm_tag (value) != SCM_MAKINUM (-1);
@@ -173,8 +175,7 @@ gdb_maybe_valid_type_p (value)
 
 
 int
-gdb_read (str)
-     char *str;
+gdb_read (char *str)
 {
   SCM ans;
   int status = 0;
@@ -239,8 +240,7 @@ exit:
 
 
 int
-gdb_eval (exp)
-     SCM exp;
+gdb_eval (SCM exp)
 {
   RESET_STRING;
   if (SCM_IMP (exp))
@@ -264,8 +264,7 @@ gdb_eval (exp)
 
 
 int
-gdb_print (obj)
-     SCM obj;
+gdb_print (SCM obj)
 {
   RESET_STRING;
   SCM_BEGIN_FOREIGN_BLOCK;
@@ -286,9 +285,7 @@ gdb_print (obj)
 
 
 int
-gdb_binding (name, value)
-     SCM name;
-     SCM value;
+gdb_binding (SCM name, SCM value)
 {
   RESET_STRING;
   if (SCM_GC_P)