From 4e1ad51815d17704c98d1fa5b2d34c89a603d228 Mon Sep 17 00:00:00 2001 From: Etienne Brateau <etienne.brateau@ensiie.fr> Date: Sat, 15 Dec 2018 22:16:14 +0100 Subject: [PATCH] move some struct into appropriate files --- log/include/gate.h | 17 ++++++++++++++++ log/include/log_action.h | 2 ++ log/include/logdef.h | 42 ---------------------------------------- log/include/wire.h | 27 ++++++++++++++++++++++++++ 4 files changed, 46 insertions(+), 42 deletions(-) diff --git a/log/include/gate.h b/log/include/gate.h index 325afb6..1840c45 100644 --- a/log/include/gate.h +++ b/log/include/gate.h @@ -1,8 +1,25 @@ #ifndef GATE_H #define GATE_H +#include <p2c/mylib.h> +#include <p2c/newasm.h> #include "logdef.h" +typedef struct log_grec { + struct log_grec *next, *confnext; + na_long info; + log_nrec **pin; + log_pinposrec *pinpos; + log_gattrrec *attr; + na_long vars; + log_krec *kind; + short g, x, y, gc, sig; + na_long temp; + uchar rot; + unsigned conflict : 1, oconflict : 1, dimcolor : 1, conflict1 : 1, + conflict2 : 1, f2 : 1, f1 : 1, f0 : 1; +} log_grec; /* Gate */ + void uaddgate(short x, short y, short gtype); void addgate1(short x, short y, short gtype); diff --git a/log/include/log_action.h b/log/include/log_action.h index e2ce105..a7a37ab 100644 --- a/log/include/log_action.h +++ b/log/include/log_action.h @@ -2,6 +2,8 @@ #define LOG_ACTION_H #include"logdef.h" +#include "gate.h" +#include "wire.h" #include<limits.h> typedef enum diff --git a/log/include/logdef.h b/log/include/logdef.h index 435ac95..34d1c04 100644 --- a/log/include/logdef.h +++ b/log/include/logdef.h @@ -235,48 +235,6 @@ typedef struct log_hnrec { struct log_hnrec *next; } log_hnrec; /* History name */ -typedef struct log_hwrec { - short x1, x2, y; /* Position of wire */ - log_nrec *node; /* Node of wire */ - struct log_hwrec *next; /* Next wire in list */ - na_long temp; - uchar wcolr; /* Color of wire */ - unsigned f7 : 1, f6 : 1, f5 : 1, f4 : 1, f3 : 1, f2 : 1, f1 : 1, f0 : 1; -} log_hwrec; /* Horizontal wire */ - -typedef struct log_vwrec { - short x, y1, y2; /* Position of wire */ - log_nrec *node; /* Node of wire */ - struct log_vwrec *next; /* Next wire in list */ - na_long temp; - uchar wcolr; /* Color of wire */ - unsigned f7 : 1, f6 : 1, f5 : 1, f4 : 1, f3 : 1, f2 : 1, f1 : 1, f0 : 1; -} log_vwrec; /* Vertical wire */ - -typedef struct log_srec { - short x, y; /* Position of solder point */ - log_hwrec *hwire, *hwire2; /* Horizontal wire(s) being soldered */ - log_vwrec *vwire, *vwire2; /* Vertical wire(s) being soldered */ - struct log_srec *next; /* Next solder point in list */ - na_long temp; - unsigned f7 : 1, f6 : 1, f5 : 1, f4 : 1, f3 : 1, f2 : 1, f1 : 1, f0 : 1; -} log_srec; /* Solder point */ - -typedef struct log_grec { - struct log_grec *next, *confnext; - na_long info; - log_nrec **pin; - log_pinposrec *pinpos; - log_gattrrec *attr; - na_long vars; - log_krec *kind; - short g, x, y, gc, sig; - na_long temp; - uchar rot; - unsigned conflict : 1, oconflict : 1, dimcolor : 1, conflict1 : 1, - conflict2 : 1, f2 : 1, f1 : 1, f0 : 1; -} log_grec; /* Gate */ - typedef struct log_lrec { short x, y, w; char name[log_lablen + 1]; diff --git a/log/include/wire.h b/log/include/wire.h index 7b73ed5..6271973 100644 --- a/log/include/wire.h +++ b/log/include/wire.h @@ -3,6 +3,33 @@ #include "logdef.h" +typedef struct log_hwrec { + short x1, x2, y; /* Position of wire */ + log_nrec *node; /* Node of wire */ + struct log_hwrec *next; /* Next wire in list */ + na_long temp; + uchar wcolr; /* Color of wire */ + unsigned f7 : 1, f6 : 1, f5 : 1, f4 : 1, f3 : 1, f2 : 1, f1 : 1, f0 : 1; +} log_hwrec; /* Horizontal wire */ + +typedef struct log_vwrec { + short x, y1, y2; /* Position of wire */ + log_nrec *node; /* Node of wire */ + struct log_vwrec *next; /* Next wire in list */ + na_long temp; + uchar wcolr; /* Color of wire */ + unsigned f7 : 1, f6 : 1, f5 : 1, f4 : 1, f3 : 1, f2 : 1, f1 : 1, f0 : 1; +} log_vwrec; /* Vertical wire */ + +typedef struct log_srec { + short x, y; /* Position of solder point */ + log_hwrec *hwire, *hwire2; /* Horizontal wire(s) being soldered */ + log_vwrec *vwire, *vwire2; /* Vertical wire(s) being soldered */ + struct log_srec *next; /* Next solder point in list */ + na_long temp; + unsigned f7 : 1, f6 : 1, f5 : 1, f4 : 1, f3 : 1, f2 : 1, f1 : 1, f0 : 1; +} log_srec; /* Solder point */ + void addvwire2(short x, short y1, short y2); void addhwire2(short x1, short x2, short y); -- GitLab