From 8a8e03e332c828fdcdbb6e13c28511e6f0c405d5 Mon Sep 17 00:00:00 2001
From: Eliah Rebstock <elireb54@outlook.com>
Date: Thu, 21 Feb 2019 23:00:14 +0100
Subject: [PATCH] Try moving stuff around

---
 include/logdef.h     | 23 ++---------------------
 include/logstructs.h |  5 +++++
 include/tool.h       |  6 ++++++
 include/wire.h       |  3 +++
 4 files changed, 16 insertions(+), 21 deletions(-)

diff --git a/include/logdef.h b/include/logdef.h
index ee1042f..a402140 100644
--- a/include/logdef.h
+++ b/include/logdef.h
@@ -225,8 +225,6 @@ typedef struct log_pinposrec {
   short x, y;
 } log_pinposrec;
 
-typedef struct log_nrec log_nrec; /* Node */
-
 typedef struct log_sigrec {
   char *name;
   unsigned f : 1, keep : 1, f5 : 1, f4 : 1, f3 : 1, f2 : 1, f1 : 1, f0 : 1;
@@ -261,24 +259,7 @@ typedef struct log_colorrec {
 	popupsel, redword, blueword, vlsicut;
 } log_colorrec;
 
-typedef struct log_tool {
-  char name[17];
-  void (*proc) (struct 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;
-
-typedef enum
+enum log_actionkinds
 {
 	act_init,
 	act_endinit,
@@ -332,7 +313,7 @@ typedef enum
 	act_gennode,
 	act_genkind,
 	act_gengate
-} log_actionkinds;
+}
 
 typedef struct log_hooks_t
 {
diff --git a/include/logstructs.h b/include/logstructs.h
index 74093cd..cbe1bea 100644
--- a/include/logstructs.h
+++ b/include/logstructs.h
@@ -2,6 +2,11 @@
 
 #include "settings.h"
 #include "logdef.h"
+#include "wire.h"
+#include "tool.h"
+#include "gate.h"
+#include "page.h"
+#include "box.h"
 
 /** ??? */
 typedef struct descrec {
diff --git a/include/tool.h b/include/tool.h
index 1d4b054..4a8b910 100644
--- a/include/tool.h
+++ b/include/tool.h
@@ -2,6 +2,9 @@
 
 #include "logdef.h"
 
+typedef struct log_action_t log_action_t;
+typedef struct log_kattrrec log_kattrrec;
+
 typedef struct log_tool {
   char name[17];
   void (*proc) (log_action_t *act);
@@ -19,6 +22,9 @@ typedef struct log_tool {
   double deltatime;
 } log_tool;
 
+typedef struct log_grec log_grec;
+typedef struct log_nrec log_nrec;
+typedef struct log_krec log_krec;
 
 void newtool(log_tool **t, char *name);
 log_tool *findtool(char *name_);
diff --git a/include/wire.h b/include/wire.h
index 5ef47d0..1fae7f3 100644
--- a/include/wire.h
+++ b/include/wire.h
@@ -1,6 +1,9 @@
 #pragma once
 
 #include "logdef.h"
+#include "node.h"
+
+typedef struct log_nrec log_nrec;
 
 typedef struct log_hwrec {
   short x1, x2, y;   /* Position of wire */
-- 
GitLab