From f134adfc6ad329cc8136abd0162986a13a7aa647 Mon Sep 17 00:00:00 2001
From: curt <curt>
Date: Fri, 14 Jul 2000 16:08:46 +0000
Subject: [PATCH] Tweaks to build with newest gcc under Irix contributed by
 Erik Hofman.

---
 src/NetworkOLK/net_send.cxx    |  1 +
 src/WeatherCM/FGCloud.h        |  2 +-
 src/WeatherCM/FGCloudItem.h    |  2 +-
 src/WeatherCM/FGSnowRain.h     |  2 +-
 src/WeatherCM/FGWeatherUtils.h |  2 +-
 src/WeatherCM/linintp2.inl     | 16 +++++++++++-----
 6 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/src/NetworkOLK/net_send.cxx b/src/NetworkOLK/net_send.cxx
index 80724cc78..2147ded22 100644
--- a/src/NetworkOLK/net_send.cxx
+++ b/src/NetworkOLK/net_send.cxx
@@ -32,6 +32,7 @@
 /*************************************************************/
 
 #include <stdio.h>
+#include <strings.h>
 #include "fgd.h"
 
 /* I prefer NHV's decl. */
diff --git a/src/WeatherCM/FGCloud.h b/src/WeatherCM/FGCloud.h
index 2995e0892..844cec449 100644
--- a/src/WeatherCM/FGCloud.h
+++ b/src/WeatherCM/FGCloud.h
@@ -64,4 +64,4 @@ public:
 };
 
 /****************************************************************************/
-#endif /*FGCloud_H*/
\ No newline at end of file
+#endif /*FGCloud_H*/
diff --git a/src/WeatherCM/FGCloudItem.h b/src/WeatherCM/FGCloudItem.h
index 652ddccd7..4b6260d96 100644
--- a/src/WeatherCM/FGCloudItem.h
+++ b/src/WeatherCM/FGCloudItem.h
@@ -74,4 +74,4 @@ public:
 };
 
 /****************************************************************************/
-#endif /*FGCloudItem_H*/
\ No newline at end of file
+#endif /*FGCloudItem_H*/
diff --git a/src/WeatherCM/FGSnowRain.h b/src/WeatherCM/FGSnowRain.h
index b1dd713d4..bf82101af 100644
--- a/src/WeatherCM/FGSnowRain.h
+++ b/src/WeatherCM/FGSnowRain.h
@@ -72,4 +72,4 @@ public:
 };
 
 /****************************************************************************/
-#endif /*FGSnowRain_H*/
\ No newline at end of file
+#endif /*FGSnowRain_H*/
diff --git a/src/WeatherCM/FGWeatherUtils.h b/src/WeatherCM/FGWeatherUtils.h
index 485c12035..cf25b988d 100644
--- a/src/WeatherCM/FGWeatherUtils.h
+++ b/src/WeatherCM/FGWeatherUtils.h
@@ -211,4 +211,4 @@ inline WeatherPrecision Pascal2psf	    (const WeatherPrecision Pascal)
 /****************************************************************************/
 
 /****************************************************************************/
-#endif /*FGWeatherUtils_H*/
\ No newline at end of file
+#endif /*FGWeatherUtils_H*/
diff --git a/src/WeatherCM/linintp2.inl b/src/WeatherCM/linintp2.inl
index 1fd489d1b..20dc2a857 100644
--- a/src/WeatherCM/linintp2.inl
+++ b/src/WeatherCM/linintp2.inl
@@ -101,12 +101,18 @@ template<class T>
 void mgcLinInterp2D<T>::ComputeBarycenter (Vertex& v0, Vertex& v1, Vertex& v2, 
                                            Vertex& ver, double c[3])
 {
-    double A0 = v0.x-v2.x, B0 = v0.y-v2.y;
-    double A1 = v1.x-v2.x, B1 = v1.y-v2.y;
-    double A2 = ver.x-v2.x, B2 = ver.y-v2.y;
+    double A0 = v0.x-v2.x;
+    double B0 = v0.y-v2.y;
+    double A1 = v1.x-v2.x;
+    double B1 = v1.y-v2.y;
+    double A2 = ver.x-v2.x;
+    double B2 = ver.y-v2.y;
 
-    double m00 = A0*A0+B0*B0, m01 = A0*A1+B0*B1, m11 = A1*A1+B1*B1;
-    double r0 = A2*A0+B2*B0, r1 = A2*A1+B2*B1;
+    double m00 = A0*A0+B0*B0;
+    double m01 = A0*A1+B0*B1;
+    double m11 = A1*A1+B1*B1;
+    double r0 = A2*A0+B2*B0;
+    double r1 = A2*A1+B2*B1;
     double det = m00*m11-m01*m01;
 
     c[0] = (m11*r0-m01*r1)/det;