From 0bd0d94ff0d74353b13c6c9b6a4629f325c8e48a Mon Sep 17 00:00:00 2001
From: Etienne Brateau <etienne.brateau@ensiie.fr>
Date: Tue, 29 Jan 2019 23:20:22 +0100
Subject: [PATCH] wire: avoir forward declaration of two functions

---
 src/wire.c | 76 ++++++++++++++++++++++++++----------------------------
 1 file changed, 37 insertions(+), 39 deletions(-)

diff --git a/src/wire.c b/src/wire.c
index 301dcff..73100cf 100644
--- a/src/wire.c
+++ b/src/wire.c
@@ -10,8 +10,43 @@
 #include "log.h"
 #include "screen.h"
 
-void fryhwire(log_hwrec *hw);
-void fryvwire(log_vwrec *vw);
+void fryhwire(log_hwrec *hw)
+{
+	long t0;
+
+	remcursor();
+	clipon();
+	t0 = sysclock();
+	while (labs(sysclock() - t0) < frytime)
+	{
+		m_color((long)gg.color.conflict);
+		hline(hw->x1, hw->x2, hw->y);
+		m_color((long)gg.color.backgr);
+		hline(hw->x1, hw->x2, hw->y);
+	}
+	clipoff();
+	refreshsoon();
+}
+
+
+void fryvwire(log_vwrec *vw)
+{
+	long t0;
+
+	remcursor();
+	clipon();
+	t0 = sysclock();
+	while (labs(sysclock() - t0) < frytime)
+	{
+		m_color((long)gg.color.conflict);
+		vline(vw->x, vw->y1, vw->y2);
+		m_color((long)gg.color.backgr);
+		vline(vw->x, vw->y1, vw->y2);
+	}
+	clipoff();
+	refreshsoon();
+}
+
 
 /* Local variables for wantsolder: */
 struct LOC_wantsolder
@@ -939,40 +974,3 @@ void addvwire2(short x, short y1, short y2)
 	addvwire(x, y1, y2, log_wcol_normal);
 }
 
-void fryhwire(log_hwrec *hw)
-{
-	long t0;
-
-	remcursor();
-	clipon();
-	t0 = sysclock();
-	while (labs(sysclock() - t0) < frytime)
-	{
-		m_color((long)gg.color.conflict);
-		hline(hw->x1, hw->x2, hw->y);
-		m_color((long)gg.color.backgr);
-		hline(hw->x1, hw->x2, hw->y);
-	}
-	clipoff();
-	refreshsoon();
-}
-
-
-void fryvwire(log_vwrec *vw)
-{
-	long t0;
-
-	remcursor();
-	clipon();
-	t0 = sysclock();
-	while (labs(sysclock() - t0) < frytime)
-	{
-		m_color((long)gg.color.conflict);
-		vline(vw->x, vw->y1, vw->y2);
-		m_color((long)gg.color.backgr);
-		vline(vw->x, vw->y1, vw->y2);
-	}
-	clipoff();
-	refreshsoon();
-}
-
-- 
GitLab