Borland portability fixes contributed by Charlie Hotchkiss.
This commit is contained in:
parent
40db8d0c1f
commit
bc91f0ce1c
13 changed files with 58 additions and 15 deletions
|
@ -28,27 +28,24 @@
|
||||||
|
|
||||||
#include <Include/compiler.h>
|
#include <Include/compiler.h>
|
||||||
|
|
||||||
#include STL_STRING
|
|
||||||
|
|
||||||
#ifdef FG_HAVE_STD_INCLUDES
|
#ifdef FG_HAVE_STD_INCLUDES
|
||||||
|
# include <cmath>
|
||||||
# include <cstdio> // sprintf()
|
# include <cstdio> // sprintf()
|
||||||
# include <iostream>
|
# include <iostream>
|
||||||
#else
|
#else
|
||||||
|
# include <math.h>
|
||||||
# include <stdio.h> // sprintf()
|
# include <stdio.h> // sprintf()
|
||||||
# include <iostream.h>
|
# include <iostream.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include STL_STRING
|
||||||
|
|
||||||
FG_USING_STD(string);
|
FG_USING_STD(string);
|
||||||
|
|
||||||
#if ! defined( FG_HAVE_NATIVE_SGI_COMPILERS )
|
#if ! defined( FG_HAVE_NATIVE_SGI_COMPILERS )
|
||||||
FG_USING_STD(ostream);
|
FG_USING_STD(ostream);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __MWERKS__
|
|
||||||
#include <math.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <Include/fg_constants.h>
|
#include <Include/fg_constants.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,10 @@
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef FG_MATH_EXCEPTION_CLASH
|
||||||
|
# include <math.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_WINDOWS_H
|
#ifdef HAVE_WINDOWS_H
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,6 +23,10 @@
|
||||||
|
|
||||||
#include <Include/compiler.h>
|
#include <Include/compiler.h>
|
||||||
|
|
||||||
|
#ifdef FG_MATH_EXCEPTION_CLASH
|
||||||
|
# include <math.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include STL_STRING
|
#include STL_STRING
|
||||||
|
|
||||||
#include <Aircraft/aircraft.hxx>
|
#include <Aircraft/aircraft.hxx>
|
||||||
|
|
|
@ -26,12 +26,16 @@
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <Include/compiler.h>
|
||||||
|
|
||||||
|
#ifdef FG_MATH_EXCEPTION_CLASH
|
||||||
|
# include <math.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_WINDOWS_H
|
#ifdef HAVE_WINDOWS_H
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <Include/compiler.h>
|
|
||||||
|
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
#include <XGL/xgl.h>
|
#include <XGL/xgl.h>
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,10 @@
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef FG_MATH_EXCEPTION_CLASH
|
||||||
|
# include <math.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_WINDOWS_H
|
#ifdef HAVE_WINDOWS_H
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
# include <float.h>
|
# include <float.h>
|
||||||
|
|
|
@ -27,6 +27,11 @@
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#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 <GL/glut.h>
|
||||||
#include <XGL/xgl.h>
|
#include <XGL/xgl.h>
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,10 @@
|
||||||
#include <Include/compiler.h>
|
#include <Include/compiler.h>
|
||||||
|
|
||||||
#ifdef FG_HAVE_STD_INCLUDES
|
#ifdef FG_HAVE_STD_INCLUDES
|
||||||
|
# include <cmath>
|
||||||
# include <cstdlib> // atoi()
|
# include <cstdlib> // atoi()
|
||||||
#else
|
#else
|
||||||
|
# include <math.h>
|
||||||
# include <stdlib.h> // atoi()
|
# include <stdlib.h> // atoi()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,10 @@
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef FG_MATH_EXCEPTION_CLASH
|
||||||
|
# include <math.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_WINDOWS_H
|
#ifdef HAVE_WINDOWS_H
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -25,6 +25,10 @@
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef FG_MATH_EXCEPTION_CLASH
|
||||||
|
# include <math.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_WINDOWS_H
|
#ifdef HAVE_WINDOWS_H
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,6 +23,10 @@
|
||||||
|
|
||||||
#include <Include/compiler.h>
|
#include <Include/compiler.h>
|
||||||
|
|
||||||
|
#ifdef FG_MATH_EXCEPTION_CLASH
|
||||||
|
# include <math.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include STL_FUNCTIONAL
|
#include STL_FUNCTIONAL
|
||||||
#include STL_ALGORITHM
|
#include STL_ALGORITHM
|
||||||
|
|
||||||
|
|
|
@ -25,12 +25,15 @@
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
#include "Include/compiler.h"
|
#include "Include/compiler.h"
|
||||||
|
|
||||||
|
#ifdef FG_MATH_EXCEPTION_CLASH
|
||||||
|
# include <math.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include STL_ALGORITHM
|
#include STL_ALGORITHM
|
||||||
#include STL_FUNCTIONAL
|
#include STL_FUNCTIONAL
|
||||||
|
#include STL_STRING
|
||||||
|
|
||||||
#ifdef FG_HAVE_STD_INCLUDES
|
#ifdef FG_HAVE_STD_INCLUDES
|
||||||
# include <cstdio>
|
# include <cstdio>
|
||||||
|
@ -56,6 +59,7 @@
|
||||||
|
|
||||||
FG_USING_STD(for_each);
|
FG_USING_STD(for_each);
|
||||||
FG_USING_STD(mem_fun);
|
FG_USING_STD(mem_fun);
|
||||||
|
FG_USING_STD(string);
|
||||||
|
|
||||||
fgEVENT_MGR global_events;
|
fgEVENT_MGR global_events;
|
||||||
|
|
||||||
|
|
|
@ -117,13 +117,20 @@ main(int argc, char **argv) {
|
||||||
FGBucket tmp1( 0.0, 0.0 );
|
FGBucket tmp1( 0.0, 0.0 );
|
||||||
|
|
||||||
double dy = tmp1.get_height();
|
double dy = tmp1.get_height();
|
||||||
|
lat = 44.25 + dy * 0.5;
|
||||||
lat = -90.0 + dy * 0.5;
|
|
||||||
|
bool start_lon = true;
|
||||||
|
lon = -85.75 + (1.0/16.0);
|
||||||
|
|
||||||
while ( lat <= 90.0 ) {
|
while ( lat <= 90.0 ) {
|
||||||
FGBucket tmp2( 0.0, lat );
|
FGBucket tmp2( 0.0, lat );
|
||||||
double dx = tmp2.get_width();
|
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 ) {
|
while ( lon <= 180.0 ) {
|
||||||
FGBucket b( lon, lat );
|
FGBucket b( lon, lat );
|
||||||
cout << "Bucket = " << b << endl;
|
cout << "Bucket = " << b << endl;
|
||||||
|
|
|
@ -402,7 +402,7 @@ int FGTriangle::run_triangulate( int pass ) {
|
||||||
vorout.normlist = (REAL *) NULL; // Needed only if -v switch used.
|
vorout.normlist = (REAL *) NULL; // Needed only if -v switch used.
|
||||||
|
|
||||||
// TEMPORARY
|
// TEMPORARY
|
||||||
// write_out_data(&in);
|
write_out_data(&in);
|
||||||
|
|
||||||
// Triangulate the points. Switches are chosen to read and write
|
// Triangulate the points. Switches are chosen to read and write
|
||||||
// a PSLG (p), preserve the convex hull (c), number everything
|
// a PSLG (p), preserve the convex hull (c), number everything
|
||||||
|
|
Loading…
Reference in a new issue