From 14ac94f4e40443663d4404273dbc3a45f5f99129 Mon Sep 17 00:00:00 2001
From: Etienne Brateau <etienne.brateau@ensiie.fr>
Date: Wed, 30 Jan 2019 12:01:54 +0100
Subject: [PATCH] move tool struct definition into tool.h

---
 include/logdef.h     | 17 -----------------
 include/logglobals.h |  1 +
 include/logsima.h    |  1 +
 include/node.h       |  1 +
 include/tool.h       | 18 ++++++++++++++++++
 src/logcom.c         |  1 +
 src/logsim.c         |  1 +
 7 files changed, 23 insertions(+), 17 deletions(-)

diff --git a/include/logdef.h b/include/logdef.h
index 1585c59..7000ddf 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 2e1fdc0..0301447 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 ee394b9..18faf6e 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 efc87d3..5325715 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 6d2fa76..7c64c49 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 c396586..3aff601 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 8879052..2b3a73b 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 $
-- 
GitLab