]> git.mxchange.org Git - flightgear.git/commitdiff
Borland portability fixes contributed by Charlie Hotchkiss.
authorcurt <curt>
Sat, 8 May 1999 02:33:13 +0000 (02:33 +0000)
committercurt <curt>
Sat, 8 May 1999 02:33:13 +0000 (02:33 +0000)
13 files changed:
Lib/Bucket/newbucket.hxx
Simulator/Cockpit/panel.cxx
Simulator/FDM/JSBsim.cxx
Simulator/GUI/gui.cxx
Simulator/Main/GLUTmain.cxx
Simulator/Main/fg_init.cxx
Simulator/Main/fg_serial.cxx
Simulator/Main/splash.cxx
Simulator/Objects/obj.cxx
Simulator/Scenery/tile.cxx
Simulator/Time/event.cxx
Tools/Construct/Main/master.cxx
Tools/Construct/Triangulate/triangle.cxx

index 6871b3ee67cd8fd4a230ec8420f2882f76afa674..743c81d61720201dc9c0a8040ce41a4f07ba36c0 100644 (file)
 
 #include <Include/compiler.h>
 
-#include STL_STRING
-
 #ifdef FG_HAVE_STD_INCLUDES
+#  include <cmath>
 #  include <cstdio> // sprintf()
 #  include <iostream>
 #else
+#  include <math.h>
 #  include <stdio.h> // sprintf()
 #  include <iostream.h>
 #endif
 
+#include STL_STRING
+
 FG_USING_STD(string);
 
 #if ! defined( FG_HAVE_NATIVE_SGI_COMPILERS )
 FG_USING_STD(ostream);
 #endif
 
-#ifdef __MWERKS__
-#include <math.h>
-#include <stdio.h>
-#endif
-
 #include <Include/fg_constants.h>
 
 
index 4680e477b8e427b628aea67c64a1bb11401b4185..e8f6fba436854ddcad0eead357707a0ec3c266f8 100644 (file)
 #  include <config.h>
 #endif
 
+#ifdef FG_MATH_EXCEPTION_CLASH
+#  include <math.h>
+#endif        
+
 #ifdef HAVE_WINDOWS_H          
 #  include <windows.h>
 #endif
index 0f8dc9eef991ff5446a45c7a272480ac36fd9f47..80cc7f5922ecd26facb757a6e2e9aa6022534d0a 100644 (file)
 
 #include <Include/compiler.h>
 
+#ifdef FG_MATH_EXCEPTION_CLASH
+#  include <math.h>
+#endif
+
 #include STL_STRING
 
 #include <Aircraft/aircraft.hxx>
index cee0a69f599db91360a03a606ffb08a6ccb07c89..c7a88c489eb16b11dc31523ec0e451ad8d2d2159 100644 (file)
 #  include <config.h>
 #endif
 
+#include <Include/compiler.h>
+
+#ifdef FG_MATH_EXCEPTION_CLASH
+#  include <math.h>
+#endif
+
 #ifdef HAVE_WINDOWS_H
 #  include <windows.h>
 #endif
 
-#include <Include/compiler.h>
-
 #include <GL/glut.h>
 #include <XGL/xgl.h>
 
index 215f8181864318402503d71cec9f3aab292b0c78..7e037d4c0bb8a76d625fdeb39afdb0414091c83c 100644 (file)
 #  include <config.h>
 #endif
 
+#ifdef FG_MATH_EXCEPTION_CLASH
+#  include <math.h>
+#endif
+
 #ifdef HAVE_WINDOWS_H
 #  include <windows.h>                     
 #  include <float.h>                    
index 3da8f3d8c30fac52aaaedb7025def7e0efe36862..fa723fbe51f8d7d3fb7eff99658b66e3c110fd86 100644 (file)
 #  include <config.h>
 #endif
 
+// For BC 5.01 this must be included before OpenGL includes.
+#ifdef FG_MATH_EXCEPTION_CLASH
+#  include <math.h>
+#endif
+
 #include <GL/glut.h>
 #include <XGL/xgl.h>
 
index fef2c32d578ea31c751303d35ff975e1ce1cdfc3..b7018ac0859c22fa23a9c8ec1253c9733026e234 100644 (file)
 #include <Include/compiler.h>
 
 #ifdef FG_HAVE_STD_INCLUDES
+#  include <cmath>
 #  include <cstdlib>    // atoi()
 #else
+#  include <math.h>
 #  include <stdlib.h>   // atoi()
 #endif
 
index ea3db088c6c98036a7274cc796fbee2996914ac1..7f07e291841def0dd1cf89f8498d8442d1ff8f26 100644 (file)
 #  include <config.h>
 #endif
 
+#ifdef FG_MATH_EXCEPTION_CLASH
+#  include <math.h>
+#endif
+
 #ifdef HAVE_WINDOWS_H          
 #  include <windows.h>
 #endif
index c670fb366997678a70e6b0c37e3bd44ca3dc7d35..936d20a876ada9d098627dd8841ecce3bdd03901 100644 (file)
 #  include <config.h>
 #endif
 
+#ifdef FG_MATH_EXCEPTION_CLASH
+#  include <math.h>
+#endif
+
 #ifdef HAVE_WINDOWS_H
 #  include <windows.h>
 #endif
index ccbb811ca42999b31c7729a4a861e9b0145a849b..52a271f03a1d5e8645ae461e5d8526af86ae1247 100644 (file)
 
 #include <Include/compiler.h>
 
+#ifdef FG_MATH_EXCEPTION_CLASH
+#  include <math.h>
+#endif
+
 #include STL_FUNCTIONAL
 #include STL_ALGORITHM
 
index 680eac6d885e50c3ddcb3f0cd577bb785bfc3023..9a31d19b03f9c6744cbe5ac04ae86af54274aea9 100644 (file)
 #  include <config.h>
 #endif
 
-#include <string>
-
 #include "Include/compiler.h"
 
+#ifdef FG_MATH_EXCEPTION_CLASH
+#  include <math.h>
+#endif
+
 #include STL_ALGORITHM
 #include STL_FUNCTIONAL
+#include STL_STRING
 
 #ifdef FG_HAVE_STD_INCLUDES
 #  include <cstdio>
@@ -56,6 +59,7 @@
 
 FG_USING_STD(for_each);
 FG_USING_STD(mem_fun);
+FG_USING_STD(string);
 
 fgEVENT_MGR global_events;
 
index 04d2f9cae22c78ec2d8cb2f1a7b3b817c70ab41e..159f1549efcfd811654ed3ed5e6a7a85c143ac94 100644 (file)
@@ -117,13 +117,20 @@ main(int argc, char **argv) {
     FGBucket tmp1( 0.0, 0.0 );
 
     double dy = tmp1.get_height();
-       
-    lat = -90.0 + dy * 0.5;
+    lat = 44.25 + dy * 0.5;
+
+    bool start_lon = true;
+    lon = -85.75 + (1.0/16.0);
+
     while ( lat <= 90.0 ) {
        FGBucket tmp2( 0.0, lat );
        double dx = tmp2.get_width();
 
-       lon = -180 + dx * 0.5;
+       if ( ! start_lon ) {
+           lon = -180 + dx * 0.5;
+       } else {
+           start_lon = false;
+       }
        while ( lon <= 180.0 ) {
            FGBucket b( lon, lat );
            cout << "Bucket = " << b << endl;
index 4258f93b7773b5055ed76e9b88b358aacc5d3271..f3adb95f4ca3bb4bb48da8d3b7364410cd28f44d 100644 (file)
@@ -402,7 +402,7 @@ int FGTriangle::run_triangulate( int pass ) {
     vorout.normlist = (REAL *) NULL;      // Needed only if -v switch used.
     
     // TEMPORARY
-    // write_out_data(&in);
+    write_out_data(&in);
 
     // Triangulate the points.  Switches are chosen to read and write
     // a PSLG (p), preserve the convex hull (c), number everything