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 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>
|
||||
|
||||
|
||||
|
|
|
@ -25,6 +25,10 @@
|
|||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef FG_MATH_EXCEPTION_CLASH
|
||||
# include <math.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
|
|
@ -23,6 +23,10 @@
|
|||
|
||||
#include <Include/compiler.h>
|
||||
|
||||
#ifdef FG_MATH_EXCEPTION_CLASH
|
||||
# include <math.h>
|
||||
#endif
|
||||
|
||||
#include STL_STRING
|
||||
|
||||
#include <Aircraft/aircraft.hxx>
|
||||
|
|
|
@ -26,12 +26,16 @@
|
|||
# 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>
|
||||
|
||||
|
|
|
@ -26,6 +26,10 @@
|
|||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef FG_MATH_EXCEPTION_CLASH
|
||||
# include <math.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
# include <windows.h>
|
||||
# include <float.h>
|
||||
|
|
|
@ -27,6 +27,11 @@
|
|||
# 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>
|
||||
|
||||
|
|
|
@ -24,8 +24,10 @@
|
|||
#include <Include/compiler.h>
|
||||
|
||||
#ifdef FG_HAVE_STD_INCLUDES
|
||||
# include <cmath>
|
||||
# include <cstdlib> // atoi()
|
||||
#else
|
||||
# include <math.h>
|
||||
# include <stdlib.h> // atoi()
|
||||
#endif
|
||||
|
||||
|
|
|
@ -26,6 +26,10 @@
|
|||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef FG_MATH_EXCEPTION_CLASH
|
||||
# include <math.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
|
|
@ -25,6 +25,10 @@
|
|||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef FG_MATH_EXCEPTION_CLASH
|
||||
# include <math.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
|
|
@ -23,6 +23,10 @@
|
|||
|
||||
#include <Include/compiler.h>
|
||||
|
||||
#ifdef FG_MATH_EXCEPTION_CLASH
|
||||
# include <math.h>
|
||||
#endif
|
||||
|
||||
#include STL_FUNCTIONAL
|
||||
#include STL_ALGORITHM
|
||||
|
||||
|
|
|
@ -25,12 +25,15 @@
|
|||
# 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;
|
||||
|
||||
|
|
|
@ -117,13 +117,20 @@ main(int argc, char **argv) {
|
|||
FGBucket tmp1( 0.0, 0.0 );
|
||||
|
||||
double dy = tmp1.get_height();
|
||||
lat = 44.25 + dy * 0.5;
|
||||
|
||||
bool start_lon = true;
|
||||
lon = -85.75 + (1.0/16.0);
|
||||
|
||||
lat = -90.0 + dy * 0.5;
|
||||
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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue