diff --git a/include/logdef.h b/include/logdef.h
index 1585c596c2dc166480d152fe87b9c78efee59b94..7000ddfb830813b8ee1e2e73ee67453264782219 100644
--- a/include/logdef.h
+++ b/include/logdef.h
@@ -246,23 +246,6 @@ typedef struct log_colorrec {
 	popupsel, redword, blueword, vlsicut;
 } log_colorrec;
 
-typedef struct log_tool {
-  char name[17];
-  void (*proc) (log_action_t *act);
-  char *fname, *comment;
-  char *shortname;
-  unsigned ready : 1, simulator : 1, keep : 1, nostatus : 1, tstepflag : 1;
-  uchar simtype;
-  double nexttstep;
-  strlist_t *nlbl, *hlbl;
-  short nnumattrs, hnumattrs;
-  log_kattrrec *nattr, *hattr;
-  na_long info;
-  struct log_tool *next;
-  long netstamp;   /* Changes to circuit network */
-  double deltatime;
-} log_tool;
-
 
 #undef vextern
 
diff --git a/include/logglobals.h b/include/logglobals.h
index 2e1fdc09dc64076bc8d2ba287fb2d1fffe858a73..03014474158f7b56bfe73d4c2d67d89588cd8461 100644
--- a/include/logglobals.h
+++ b/include/logglobals.h
@@ -5,6 +5,7 @@
 #include <graphics/newkbd.h>
 #include "settings.h"
 #include "logstructs.h"
+#include "tool.h"
 
 /* 0*/
 /* If the pen is in "this" sector, */
diff --git a/include/logsima.h b/include/logsima.h
index ee394b98455ef3bb283d010b0ab6098ffb17ba37..18faf6eab73997719c58d7f66d1dcf9276bf2cfd 100644
--- a/include/logsima.h
+++ b/include/logsima.h
@@ -5,6 +5,7 @@
 #include "logdef.h"
 #include "logdig.h"
 #include <utils/newasm.h>
+#include "tool.h"
 
 
 #ifdef LOGSIMA_G
diff --git a/include/node.h b/include/node.h
index efc87d3db3ab4c23b8fa5eb13b844cbe2b93daa6..5325715a39ace10f8f7ed01de2467e3891e5d494 100644
--- a/include/node.h
+++ b/include/node.h
@@ -3,6 +3,7 @@
 
 #include "logdef.h"
 #include "logstructs.h"
+#include "tool.h"
 
 typedef struct log_nrec {
   struct log_nrec *next;
diff --git a/include/tool.h b/include/tool.h
index 6d2fa766a75d86f0b6f5512d47e8ef58236ce730..7c64c49e46673a0907348c9f93bbceaac69c225c 100644
--- a/include/tool.h
+++ b/include/tool.h
@@ -3,6 +3,24 @@
 
 #include "logdef.h"
 
+typedef struct log_tool {
+  char name[17];
+  void (*proc) (log_action_t *act);
+  char *fname, *comment;
+  char *shortname;
+  unsigned ready : 1, simulator : 1, keep : 1, nostatus : 1, tstepflag : 1;
+  uchar simtype;
+  double nexttstep;
+  strlist_t *nlbl, *hlbl;
+  short nnumattrs, hnumattrs;
+  log_kattrrec *nattr, *hattr;
+  na_long info;
+  struct log_tool *next;
+  long netstamp;   /* Changes to circuit network */
+  double deltatime;
+} log_tool;
+
+
 void newtool(log_tool **t, char *name);
 log_tool *findtool(char *name_);
 void calltool(log_tool *t, log_actionkinds act);
diff --git a/src/logcom.c b/src/logcom.c
index c396586513b81499c21621ea43f0054d8714a6ac..3aff601f6a63d12ccc9cec2596c019a14cabdde5 100644
--- a/src/logcom.c
+++ b/src/logcom.c
@@ -45,6 +45,7 @@
 #include <graphics/newcrt.h>
 #include "logcom.h"
 #include "logstuff.h"
+#include "tool.h"
 
 #define attr_time       1
 #define attr_tstep      2
diff --git a/src/logsim.c b/src/logsim.c
index 887905235fdf2a6ef516554b84c59c303539b17a..2b3a73be7996b750f6d0bca41608767d1bc959c5 100644
--- a/src/logsim.c
+++ b/src/logsim.c
@@ -42,6 +42,7 @@
 #include <stdlib.h>
 #include "logsim.h"
 #include "node.h"
+#include "tool.h"
 
 /*$ if debugging $
   $ debug on $