diff -ur -x *.dsw -x *.dsp -x *.cfg -x *.dll -x *.exe -x *.suo -x *.obj -x *.ncb -x *.pdb -x *.idb -x *.ilk -x *.pch -x *.lib -x *.dep -x *.mak -x *.opt -x *.plg -x Debug -x Release c:\FGCVS\FlightGear\source\src\AIModel\AIBase.cxx source\src\AIModel\AIBase.cxx --- c:\FGCVS\FlightGear\source\src\AIModel\AIBase.cxx Thu Mar 09 17:07:10 2006 +++ source\src\AIModel\AIBase.cxx Thu Apr 13 13:10:03 2006 @@ -336,7 +336,9 @@ SGQuatd hlTrans = SGQuatd::fromLonLatDeg(pos.lon(), pos.lat()); // and postrotate the orientation of the AIModel wrt the horizontal // local frame +#if !defined(_MSC_VER) || (_MSC_VER > 1200) hlTrans *= SGQuatd::fromYawPitchRollDeg(hdg, pitch, roll); +#endif // #if !defined(_MSC_VER) || (_MSC_VER > 1200) // The offset converted to the usual body fixed coordinate system // rotated to the earth fiexed coordinates axis diff -ur -x *.dsw -x *.dsp -x *.cfg -x *.dll -x *.exe -x *.suo -x *.obj -x *.ncb -x *.pdb -x *.idb -x *.ilk -x *.pch -x *.lib -x *.dep -x *.mak -x *.opt -x *.plg -x Debug -x Release c:\FGCVS\FlightGear\source\src\AIModel\AICarrier.cxx source\src\AIModel\AICarrier.cxx --- c:\FGCVS\FlightGear\source\src\AIModel\AICarrier.cxx Tue Mar 21 19:28:34 2006 +++ source\src\AIModel\AICarrier.cxx Wed Apr 12 16:59:58 2006 @@ -147,6 +147,7 @@ } void FGAICarrier::update(double dt) { +#if !defined(_MSC_VER) || (_MSC_VER > 1200) // For computation of rotation speeds we just use finite differences here. // That is perfectly valid since this thing is not driven by accelerations // but by just apply discrete changes at its velocity variables. @@ -250,6 +251,7 @@ source = 6; else source = 0; +#endif // #if !defined(_MSC_VER) || (_MSC_VER > 1200) } //end update bool FGAICarrier::init() { diff -ur -x *.dsw -x *.dsp -x *.cfg -x *.dll -x *.exe -x *.suo -x *.obj -x *.ncb -x *.pdb -x *.idb -x *.ilk -x *.pch -x *.lib -x *.dep -x *.mak -x *.opt -x *.plg -x Debug -x Release c:\FGCVS\FlightGear\source\src\AIModel\AIMultiplayer.cxx source\src\AIModel\AIMultiplayer.cxx --- c:\FGCVS\FlightGear\source\src\AIModel\AIMultiplayer.cxx Wed Feb 22 15:09:42 2006 +++ source\src\AIModel\AIMultiplayer.cxx Wed Apr 12 17:41:57 2006 @@ -20,7 +20,7 @@ // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - +#pragma warning( disable:4786; disable:4503) #ifdef HAVE_CONFIG_H # include #endif @@ -87,6 +87,7 @@ if (mMotionInfo.empty()) return; +#if ( !defined(_MSC_VER) || (_MSC_VER > 1200) ) // The current simulation time we need to update for, // note that the simulation time is updated before calling all the // update methods. Thus it contains the time intervals *end* time @@ -293,6 +294,7 @@ SG_LOG(SG_GENERAL, SG_DEBUG, "Multiplayer position and orientation: " << geod << ", " << hlOr); +#endif // #if ( !defined(_MSC_VER) || (_MSC_VER > 1200) ) //###########################// // do calculations for radar // //###########################// diff -ur -x *.dsw -x *.dsp -x *.cfg -x *.dll -x *.exe -x *.suo -x *.obj -x *.ncb -x *.pdb -x *.idb -x *.ilk -x *.pch -x *.lib -x *.dep -x *.mak -x *.opt -x *.plg -x Debug -x Release c:\FGCVS\FlightGear\source\src\Aircraft\replay.cxx source\src\Aircraft\replay.cxx --- c:\FGCVS\FlightGear\source\src\Aircraft\replay.cxx Thu Mar 23 18:37:55 2006 +++ source\src\Aircraft\replay.cxx Tue Apr 11 19:00:13 2006 @@ -402,18 +402,18 @@ /** * interpolate a specific time from a specific list */ -static void interpolate( double time, const replay_list_type &list ) { +static void interpolate( double time, const replay_list_type &my_list ) { // sanity checking - if ( list.size() == 0 ) { + if ( my_list.size() == 0 ) { // handle empty list return; - } else if ( list.size() == 1 ) { + } else if ( my_list.size() == 1 ) { // handle list size == 1 - update_fdm( list[0] ); + update_fdm( my_list[0] ); return; } - unsigned int last = list.size() - 1; + unsigned int last = my_list.size() - 1; unsigned int first = 0; unsigned int mid = ( last + first ) / 2; @@ -423,11 +423,11 @@ // cout << " " << first << " <=> " << last << endl; if ( last == first ) { done = true; - } else if ( list[mid].sim_time < time && list[mid+1].sim_time < time ) { + } else if ( my_list[mid].sim_time < time && my_list[mid+1].sim_time < time ) { // too low first = mid; mid = ( last + first ) / 2; - } else if ( list[mid].sim_time > time && list[mid+1].sim_time > time ) { + } else if ( my_list[mid].sim_time > time && my_list[mid+1].sim_time > time ) { // too high last = mid; mid = ( last + first ) / 2; @@ -436,7 +436,7 @@ } } - FGReplayData result = interpolate( time, list[mid], list[mid+1] ); + FGReplayData result = interpolate( time, my_list[mid], my_list[mid+1] ); update_fdm( result ); } diff -ur -x *.dsw -x *.dsp -x *.cfg -x *.dll -x *.exe -x *.suo -x *.obj -x *.ncb -x *.pdb -x *.idb -x *.ilk -x *.pch -x *.lib -x *.dep -x *.mak -x *.opt -x *.plg -x Debug -x Release c:\FGCVS\FlightGear\source\src\Airports\groundnetwork.hxx source\src\Airports\groundnetwork.hxx --- c:\FGCVS\FlightGear\source\src\Airports\groundnetwork.hxx Wed Mar 29 15:51:27 2006 +++ source\src\Airports\groundnetwork.hxx Tue Apr 11 19:08:56 2006 @@ -36,8 +36,8 @@ typedef vector FGTaxiSegmentVector; typedef vector FGTaxiSegmentPointerVector; -typedef vector::iterator FGTaxiSegmentVectorIterator; -typedef vector::iterator FGTaxiSegmentPointerVectorIterator; +typedef FGTaxiSegmentVector::iterator FGTaxiSegmentVectorIterator; +typedef FGTaxiSegmentPointerVector::iterator FGTaxiSegmentPointerVectorIterator; /************************************************************************************** * class FGTaxiNode @@ -71,7 +71,7 @@ }; typedef vector FGTaxiNodeVector; -typedef vector::iterator FGTaxiNodeVectorIterator; +typedef FGTaxiNodeVector::iterator FGTaxiNodeVectorIterator; /*************************************************************************************** * class FGTaxiSegment @@ -107,7 +107,7 @@ typedef vector intVec; -typedef vector::iterator intVecIterator; +typedef intVec::iterator intVecIterator; class FGTaxiRoute { @@ -128,7 +128,7 @@ }; typedef vector TaxiRouteVector; -typedef vector::iterator TaxiRouteVectorIterator; +typedef TaxiRouteVector::iterator TaxiRouteVectorIterator; /************************************************************************************** * class FGGroundNetWork diff -ur -x *.dsw -x *.dsp -x *.cfg -x *.dll -x *.exe -x *.suo -x *.obj -x *.ncb -x *.pdb -x *.idb -x *.ilk -x *.pch -x *.lib -x *.dep -x *.mak -x *.opt -x *.plg -x Debug -x Release c:\FGCVS\FlightGear\source\src\Airports\parking.hxx source\src\Airports\parking.hxx --- c:\FGCVS\FlightGear\source\src\Airports\parking.hxx Wed Feb 22 15:09:45 2006 +++ source\src\Airports\parking.hxx Tue Apr 11 19:06:55 2006 @@ -91,7 +91,7 @@ }; typedef vector FGParkingVec; -typedef vector::iterator FGParkingVecIterator; -typedef vector::const_iterator FGParkingVecConstIterator; +typedef FGParkingVec::iterator FGParkingVecIterator; +typedef FGParkingVec::const_iterator FGParkingVecConstIterator; #endif diff -ur -x *.dsw -x *.dsp -x *.cfg -x *.dll -x *.exe -x *.suo -x *.obj -x *.ncb -x *.pdb -x *.idb -x *.ilk -x *.pch -x *.lib -x *.dep -x *.mak -x *.opt -x *.plg -x Debug -x Release c:\FGCVS\FlightGear\source\src\Airports\runwayprefs.cxx source\src\Airports\runwayprefs.cxx --- c:\FGCVS\FlightGear\source\src\Airports\runwayprefs.cxx Sat Apr 01 19:02:42 2006 +++ source\src\Airports\runwayprefs.cxx Tue Apr 11 19:27:28 2006 @@ -45,6 +45,10 @@ #include "runwayprefs.hxx" +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif // M_PI + /****************************************************************************** * ScheduleTime ***************e*************************************************************/ @@ -200,7 +204,6 @@ double maxCross, stringVec *currentlyActive) { - FGRunway rwy; int activeRwys = rwyList.size(); // get the number of runways active int nrOfPreferences; @@ -295,7 +298,7 @@ // but select only one landing and one takeoff runway. choice[0] = 0; choice[1] = 0; - for (int i = activeRwys-1; i; i--) + for ( i = activeRwys-1; i; i--) { if (rwyList[i].getType() == string("landing")) choice[0] = i; @@ -304,7 +307,7 @@ } //cerr << "Choosing " << choice[0] << " for landing and " << choice[1] << "for takeoff" << endl; nrOfPreferences = rwyList[0].getRwyList()->size(); - for (int i = 0; i < nrOfPreferences; i++) + for ( i = 0; i < nrOfPreferences; i++) { bool validSelection = true; for (int j = 0; j < 2; j++) diff -ur -x *.dsw -x *.dsp -x *.cfg -x *.dll -x *.exe -x *.suo -x *.obj -x *.ncb -x *.pdb -x *.idb -x *.ilk -x *.pch -x *.lib -x *.dep -x *.mak -x *.opt -x *.plg -x Debug -x Release c:\FGCVS\FlightGear\source\src\Airports\runwayprefs.hxx source\src\Airports\runwayprefs.hxx --- c:\FGCVS\FlightGear\source\src\Airports\runwayprefs.hxx Sat Mar 04 21:48:04 2006 +++ source\src\Airports\runwayprefs.hxx Tue Apr 11 19:06:26 2006 @@ -27,11 +27,11 @@ #include typedef vector timeVec; -typedef vector::const_iterator timeVecConstIterator; +typedef timeVec::const_iterator timeVecConstIterator; typedef vector stringVec; -typedef vector::iterator stringVecIterator; -typedef vector::const_iterator stringVecConstIterator; +typedef stringVec::iterator stringVecIterator; +typedef stringVec::const_iterator stringVecConstIterator; /***************************************************************************/ @@ -81,9 +81,8 @@ }; typedef vector RunwayListVec; -typedef vector::iterator RunwayListVectorIterator; -typedef vector::const_iterator RunwayListVecConstIterator; - +typedef RunwayListVec::iterator RunwayListVectorIterator; +typedef RunwayListVec::const_iterator RunwayListVecConstIterator; /*****************************************************************************/ @@ -115,8 +114,8 @@ }; typedef vector PreferenceList; -typedef vector::iterator PreferenceListIterator; -typedef vector::const_iterator PreferenceListConstIterator; +typedef PreferenceList::iterator PreferenceListIterator; +typedef PreferenceList::const_iterator PreferenceListConstIterator; /******************************************************************************/ diff -ur -x *.dsw -x *.dsp -x *.cfg -x *.dll -x *.exe -x *.suo -x *.obj -x *.ncb -x *.pdb -x *.idb -x *.ilk -x *.pch -x *.lib -x *.dep -x *.mak -x *.opt -x *.plg -x Debug -x Release c:\FGCVS\FlightGear\source\src\ATC\AIMgr.cxx source\src\ATC\AIMgr.cxx --- c:\FGCVS\FlightGear\source\src\ATC\AIMgr.cxx Fri Feb 24 14:38:37 2006 +++ source\src\ATC\AIMgr.cxx Tue Apr 11 19:33:13 2006 @@ -573,6 +573,7 @@ } string FGAIMgr::GenerateCallsign() { + int i; // For now we'll just generate US callsigns until we can regionally identify airports. string s = "N"; // Add 3 to 5 numbers and make up to 5 with letters. @@ -583,12 +584,12 @@ //cout << "First n, n = " << n << '\n'; int j = 3 + n; //cout << "j = " << j << '\n'; - for(int i=0; igetPressure_inHg() ); - vector cv = m->getClouds(); - vector::const_iterator cloud; + typedef vector vSGMC; + vSGMC cv = m->getClouds(); + vSGMC::const_iterator cloud; const char *cl = "/environment/clouds/layer[%i]"; for (i = 0, cloud = cv.begin(); cloud != cv.end(); cloud++, i++) { diff -ur -x *.dsw -x *.dsp -x *.cfg -x *.dll -x *.exe -x *.suo -x *.obj -x *.ncb -x *.pdb -x *.idb -x *.ilk -x *.pch -x *.lib -x *.dep -x *.mak -x *.opt -x *.plg -x Debug -x Release c:\FGCVS\FlightGear\source\src\Environment\fgclouds.cxx source\src\Environment\fgclouds.cxx --- c:\FGCVS\FlightGear\source\src\Environment\fgclouds.cxx Wed Feb 22 15:09:46 2006 +++ source\src\Environment\fgclouds.cxx Tue Apr 11 19:42:58 2006 @@ -107,11 +107,12 @@ return cld; } -void FGClouds::buildLayer(SGCloudField *layer, const string& name, double alt, double coverage) { - struct { +typedef struct { string name; double count; - } tCloudVariety[20]; +} CLOUDVAR; +void FGClouds::buildLayer(SGCloudField *layer, const string& name, double alt, double coverage) { + CLOUDVAR tCloudVariety[20]; int CloudVarietyCount = 0; double totalCount = 0.0; @@ -309,8 +310,9 @@ fgSetDouble("/environment/metar/pressure-inhg", m->getPressure_inHg() ); - vector cv = m->getClouds(); - vector::const_iterator cloud; + typedef vector SGMC_VEC; + SGMC_VEC cv = m->getClouds(); + SGMC_VEC::const_iterator cloud; const char *cl = "/environment/clouds/layer[%i]"; for (i = 0, cloud = cv.begin(); cloud != cv.end(); cloud++, i++) { diff -ur -x *.dsw -x *.dsp -x *.cfg -x *.dll -x *.exe -x *.suo -x *.obj -x *.ncb -x *.pdb -x *.idb -x *.ilk -x *.pch -x *.lib -x *.dep -x *.mak -x *.opt -x *.plg -x Debug -x Release c:\FGCVS\FlightGear\source\src\FDM\groundcache.cxx source\src\FDM\groundcache.cxx --- c:\FGCVS\FlightGear\source\src\FDM\groundcache.cxx Wed Feb 22 15:09:47 2006 +++ source\src\FDM\groundcache.cxx Tue Apr 11 20:16:43 2006 @@ -718,6 +718,7 @@ bool FGGroundCache::caught_wire(double t, const double pt[4][3]) { + int k; size_t sz = wires.size(); if (sz == 0) return false; @@ -742,7 +743,7 @@ // You have caught a wire if they intersect. for (size_t i = 0; i < sz; ++i) { sgdVec3 le[2]; - for (int k = 0; k < 2; ++k) { + for ( k = 0; k < 2; ++k) { sgdVec3 pivotoff, vel; sgdCopyVec3(le[k], wires[i].ends[k]); sgdSubVec3(pivotoff, le[k], wires[i].rotation_pivot); @@ -752,7 +753,7 @@ sgdAddVec3(le[k], cache_center); } - for (int k=0; k<2; ++k) { + for ( k=0; k<2; ++k) { sgdVec3 isecpoint; double isecval = sgdIsectLinesegPlane(isecpoint, le[0], le[1], plane[k]); if ( 0.0 <= isecval && isecval <= 1.0 && diff -ur -x *.dsw -x *.dsp -x *.cfg -x *.dll -x *.exe -x *.suo -x *.obj -x *.ncb -x *.pdb -x *.idb -x *.ilk -x *.pch -x *.lib -x *.dep -x *.mak -x *.opt -x *.plg -x Debug -x Release c:\FGCVS\FlightGear\source\src\FDM\JSBSim\FGJSBBase.h source\src\FDM\JSBSim\FGJSBBase.h --- c:\FGCVS\FlightGear\source\src\FDM\JSBSim\FGJSBBase.h Sat Feb 18 13:30:58 2006 +++ source\src\FDM\JSBSim\FGJSBBase.h Tue Apr 11 19:50:15 2006 @@ -52,6 +52,15 @@ # include # define M_PI SG_PI # endif +# if defined(_MSC_VER) && _MSC_VER <= 1200 +# ifndef max +# define max(a,b) (((a) > (b)) ? (a) : (b)) +# endif + +# ifndef min +# define min(a,b) (((a) < (b)) ? (a) : (b)) +# endif +# endif #else // JSBSim section diff -ur -x *.dsw -x *.dsp -x *.cfg -x *.dll -x *.exe -x *.suo -x *.obj -x *.ncb -x *.pdb -x *.idb -x *.ilk -x *.pch -x *.lib -x *.dep -x *.mak -x *.opt -x *.plg -x Debug -x Release c:\FGCVS\FlightGear\source\src\FDM\JSBSim\JSBSim.cxx source\src\FDM\JSBSim\JSBSim.cxx --- c:\FGCVS\FlightGear\source\src\FDM\JSBSim\JSBSim.cxx Thu Feb 02 17:14:51 2006 +++ source\src\FDM\JSBSim\JSBSim.cxx Tue Apr 11 19:51:15 2006 @@ -121,6 +121,7 @@ FGJSBsim::FGJSBsim( double dt ) : FGInterface(dt) { + unsigned int i; bool result; // Set up the debugging level // FIXME: this will not respond to @@ -203,7 +204,7 @@ init_gear(); // Set initial fuel levels if provided. - for (unsigned int i = 0; i < Propulsion->GetNumTanks(); i++) { + for ( i = 0; i < Propulsion->GetNumTanks(); i++) { SGPropertyNode * node = fgGetNode("/consumables/fuel/tank", i, true); if (node->getChild("level-gal_us", 0, false) != 0) { Propulsion->GetTank(i)->SetContents(node->getDoubleValue("level-gal_us") * 6.6); @@ -262,7 +263,7 @@ wind_from_east = fgGetNode("/environment/wind-from-east-fps" ,true); wind_from_down = fgGetNode("/environment/wind-from-down-fps" ,true); - for (unsigned int i = 0; i < Propulsion->GetNumEngines(); i++) { + for ( i = 0; i < Propulsion->GetNumEngines(); i++) { SGPropertyNode * node = fgGetNode("engines/engine", i, true); Propulsion->GetEngine(i)->GetThruster()->SetRPM(node->getDoubleValue("rpm") / Propulsion->GetEngine(i)->GetThruster()->GetGearRatio()); diff -ur -x *.dsw -x *.dsp -x *.cfg -x *.dll -x *.exe -x *.suo -x *.obj -x *.ncb -x *.pdb -x *.idb -x *.ilk -x *.pch -x *.lib -x *.dep -x *.mak -x *.opt -x *.plg -x Debug -x Release c:\FGCVS\FlightGear\source\src\FDM\JSBSim\models\flight_control\FGCondition.cpp source\src\FDM\JSBSim\models\flight_control\FGCondition.cpp --- c:\FGCVS\FlightGear\source\src\FDM\JSBSim\models\flight_control\FGCondition.cpp Thu Jan 12 17:04:23 2006 +++ source\src\FDM\JSBSim\models\flight_control\FGCondition.cpp Tue Apr 11 20:01:19 2006 @@ -33,7 +33,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% INCLUDES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ - +#pragma warning( disable:4786; disable:4503) #include "FGCondition.h" namespace JSBSim { diff -ur -x *.dsw -x *.dsp -x *.cfg -x *.dll -x *.exe -x *.suo -x *.obj -x *.ncb -x *.pdb -x *.idb -x *.ilk -x *.pch -x *.lib -x *.dep -x *.mak -x *.opt -x *.plg -x Debug -x Release c:\FGCVS\FlightGear\source\src\FDM\UFO.cxx source\src\FDM\UFO.cxx --- c:\FGCVS\FlightGear\source\src\FDM\UFO.cxx Sat Mar 11 18:05:17 2006 +++ source\src\FDM\UFO.cxx Fri Apr 14 11:39:11 2006 @@ -96,7 +96,15 @@ + Rudder * (1 - rudder_damp); // the velocity of the aircraft - double velocity = Throttle * Speed_Max->getDoubleValue(); // meters/sec + // double velocity = Throttle * Speed_Max->getDoubleValue(); // meters/sec + // the velocity of the aircraft + double mps = Speed_Max->getDoubleValue(); + double velocity = Throttle * mps; // meters/sec + if (globals->get_controls()->get_gear_down()) { + if( mps > 10.0 ) { + velocity = Throttle * 10; + } + } double old_pitch = get_Theta(); double pitch_rate = SGD_PI_4; // assume I will be pitching up diff -ur -x *.dsw -x *.dsp -x *.cfg -x *.dll -x *.exe -x *.suo -x *.obj -x *.ncb -x *.pdb -x *.idb -x *.ilk -x *.pch -x *.lib -x *.dep -x *.mak -x *.opt -x *.plg -x Debug -x Release c:\FGCVS\FlightGear\source\src\FDM\UIUCModel\uiuc_recorder.cpp source\src\FDM\UIUCModel\uiuc_recorder.cpp --- c:\FGCVS\FlightGear\source\src\FDM\UIUCModel\uiuc_recorder.cpp Wed Feb 22 15:09:52 2006 +++ source\src\FDM\UIUCModel\uiuc_recorder.cpp Wed Apr 12 17:02:33 2006 @@ -103,6 +103,7 @@ void uiuc_recorder( double dt ) { +#if !defined(_MSC_VER) || (_MSC_VER > 1200) stack command_list; string linetoken; static int init = 0; @@ -2477,6 +2478,8 @@ } // end record map } recordStep++; +#endif // #if !defined(_MSC_VER) || (_MSC_VER > 1200) + } // end uiuc_recorder.cpp diff -ur -x *.dsw -x *.dsp -x *.cfg -x *.dll -x *.exe -x *.suo -x *.obj -x *.ncb -x *.pdb -x *.idb -x *.ilk -x *.pch -x *.lib -x *.dep -x *.mak -x *.opt -x *.plg -x Debug -x Release c:\FGCVS\FlightGear\source\src\FDM\YASim\FGFDM.cpp source\src\FDM\YASim\FGFDM.cpp --- c:\FGCVS\FlightGear\source\src\FDM\YASim\FGFDM.cpp Sat Mar 11 18:05:17 2006 +++ source\src\FDM\YASim\FGFDM.cpp Tue Apr 11 20:15:59 2006 @@ -88,12 +88,13 @@ void FGFDM::iterate(float dt) { + int i; getExternalInput(dt); _airplane.iterate(dt); // Do fuel stuff (FIXME: should stash SGPropertyNode objects here) char buf[256]; - for(int i=0; i<_airplane.numThrusters(); i++) { + for( i=0; i<_airplane.numThrusters(); i++) { Thruster* t = _airplane.getThruster(i); sprintf(buf, "/engines/engine[%d]/out-of-fuel", i); @@ -103,7 +104,7 @@ double consumed = fgGetDouble(buf) + dt * KG2LBS * t->getFuelFlow(); fgSetDouble(buf, consumed); } - for(int i=0; i<_airplane.numTanks(); i++) { + for( i=0; i<_airplane.numTanks(); i++) { sprintf(buf, "/consumables/fuel/tank[%d]/level-lbs", i); _airplane.setFuel(i, LBS2KG * fgGetFloat(buf)); } diff -ur -x *.dsw -x *.dsp -x *.cfg -x *.dll -x *.exe -x *.suo -x *.obj -x *.ncb -x *.pdb -x *.idb -x *.ilk -x *.pch -x *.lib -x *.dep -x *.mak -x *.opt -x *.plg -x Debug -x Release c:\FGCVS\FlightGear\source\src\FDM\YASim\Turbulence.cpp source\src\FDM\YASim\Turbulence.cpp --- c:\FGCVS\FlightGear\source\src\FDM\YASim\Turbulence.cpp Mon Jan 12 06:03:55 2004 +++ source\src\FDM\YASim\Turbulence.cpp Tue Apr 11 20:15:30 2006 @@ -202,6 +202,7 @@ Turbulence::Turbulence(int gens, int seed) { + int i; _gens = gens; _sz = 1 << (_gens - 1); _seed = seed; @@ -222,7 +223,7 @@ // "Normalize" them to proper spherical magnitudes, and calculate // range information for the packing. - for(int i=0; i<_sz*_sz; i++) { + for( i=0; i<_sz*_sz; i++) { float n = cubenorm(xbuf[i], ybuf[i], zbuf[i]); xbuf[i] *= n; ybuf[i] *= n; @@ -238,7 +239,7 @@ // Pack into 3 byte tuples for storage. _data = new unsigned char[3*_sz*_sz]; - for(int i=0; i<_sz*_sz; i++) { + for( i=0; i<_sz*_sz; i++) { float x = xbuf[i], y = ybuf[i], z = zbuf[i]; unsigned char* tuple = _data + 3*i; tuple[0] = f2cu((x - _x0) / (_x1 - _x0)); diff -ur -x *.dsw -x *.dsp -x *.cfg -x *.dll -x *.exe -x *.suo -x *.obj -x *.ncb -x *.pdb -x *.idb -x *.ilk -x *.pch -x *.lib -x *.dep -x *.mak -x *.opt -x *.plg -x Debug -x Release c:\FGCVS\FlightGear\source\src\GUI\menubar.cxx source\src\GUI\menubar.cxx --- c:\FGCVS\FlightGear\source\src\GUI\menubar.cxx Thu Dec 15 22:07:14 2005 +++ source\src\GUI\menubar.cxx Tue Apr 11 20:22:16 2006 @@ -340,7 +340,10 @@ // Delete all those bindings SG_LOG(SG_GENERAL, SG_INFO, "Deleting bindings"); - map >::iterator it; + // map >::iterator it; + typedef vector VEC_FGB; + typedef map MAP_VEC_FGB; + MAP_VEC_FGB::iterator it; it = _bindings.begin(); for (it = _bindings.begin(); it != _bindings.end(); it++) { SG_LOG(SG_GENERAL, SG_INFO, "Deleting bindings for " << it->first); diff -ur -x *.dsw -x *.dsp -x *.cfg -x *.dll -x *.exe -x *.suo -x *.obj -x *.ncb -x *.pdb -x *.idb -x *.ilk -x *.pch -x *.lib -x *.dep -x *.mak -x *.opt -x *.plg -x Debug -x Release c:\FGCVS\FlightGear\source\src\GUI\new_gui.cxx source\src\GUI\new_gui.cxx --- c:\FGCVS\FlightGear\source\src\GUI\new_gui.cxx Tue Mar 21 19:28:35 2006 +++ source\src\GUI\new_gui.cxx Tue Apr 11 20:20:05 2006 @@ -62,10 +62,12 @@ reset(false); } +typedef map MAP_SFGD; + void NewGUI::reset (bool reload) { - map::iterator iter; + MAP_SFGD::iterator iter; vector dlg; // close all open dialogs and remember them ... for (iter = _active_dialogs.begin(); iter != _active_dialogs.end(); ++iter) @@ -111,7 +113,7 @@ void NewGUI::update (double delta_time_sec) { - map::iterator iter = _active_dialogs.begin(); + MAP_SFGD::iterator iter = _active_dialogs.begin(); for(/**/; iter != _active_dialogs.end(); iter++) iter->second->update(); } @@ -138,7 +140,8 @@ // Kill any entries in _active_dialogs... Is there an STL // algorithm to do (delete map entries by value, not key)? I hate // the STL :) -Andy - map::iterator iter = _active_dialogs.begin(); + // map::iterator iter = _active_dialogs.begin(); + MAP_SFGD::iterator iter = _active_dialogs.begin(); for(/**/; iter != _active_dialogs.end(); iter++) { if(iter->second == _active_dialog) { _active_dialogs.erase(iter); diff -ur -x *.dsw -x *.dsp -x *.cfg -x *.dll -x *.exe -x *.suo -x *.obj -x *.ncb -x *.pdb -x *.idb -x *.ilk -x *.pch -x *.lib -x *.dep -x *.mak -x *.opt -x *.plg -x Debug -x Release c:\FGCVS\FlightGear\source\src\GUI\new_gui.hxx source\src\GUI\new_gui.hxx --- c:\FGCVS\FlightGear\source\src\GUI\new_gui.hxx Fri Jan 27 13:33:34 2006 +++ source\src\GUI\new_gui.hxx Tue Apr 11 19:32:41 2006 @@ -222,8 +222,9 @@ puFont *_font; map _colors; - typedef map::iterator _itt_t; - typedef map::const_iterator _citt_t; + typedef map CFGLT; + typedef CFGLT::iterator _itt_t; + typedef CFGLT::const_iterator _citt_t; void clear_colors(); @@ -298,9 +299,9 @@ fntTexFont *texfont; }; SGPath _path; - - map _fonts; - typedef map::const_iterator _itt_t; + typedef map m_fonts; + m_fonts _fonts; + typedef m_fonts::const_iterator _itt_t; public: FGFontCache(); Only in source\src\Include: config.h Only in source\src\Include: config.h-msvc6 Only in c:\FGCVS\FlightGear\source\src\Include: config.h-msvc6.in diff -ur -x *.dsw -x *.dsp -x *.cfg -x *.dll -x *.exe -x *.suo -x *.obj -x *.ncb -x *.pdb -x *.idb -x *.ilk -x *.pch -x *.lib -x *.dep -x *.mak -x *.opt -x *.plg -x Debug -x Release c:\FGCVS\FlightGear\source\src\Instrumentation\dclgps.cxx source\src\Instrumentation\dclgps.cxx --- c:\FGCVS\FlightGear\source\src\Instrumentation\dclgps.cxx Tue Mar 14 15:12:48 2006 +++ source\src\Instrumentation\dclgps.cxx Tue Apr 11 20:56:19 2006 @@ -262,8 +262,11 @@ _currentCdiScale = 5.0; _cleanUpPage = -1; - +#if (defined(_MSC_VER) && (_MSC_VER < 1300)) + _activeWaypoint.id = ""; +#else // #if (defined(_MSC_VER) && (_MSC_VER < 1300)) _activeWaypoint.id.clear(); +#endif // #if (defined(_MSC_VER) && (_MSC_VER < 1300)) _dist2Act = 0.0; _crosstrackDist = 0.0; _headingBugTo = true; @@ -371,8 +374,8 @@ } } const fix_map_type* fixes = globals->get_fixlist()->getFixList(); - for(fix_map_const_iterator itr = fixes->begin(); itr != fixes->end(); ++itr) { - FGFix f = itr->second; + for( fix_map_const_iterator itr2 = fixes->begin(); itr2 != fixes->end(); ++itr2) { + FGFix f = itr2->second; GPSWaypoint* w = new GPSWaypoint; w->id = f.get_ident(); w->lat = f.get_lat() * SG_DEGREES_TO_RADIANS; @@ -728,10 +731,18 @@ // FIXME - currently all the below assumes leg mode and no DTO or OBS cancelled. if(_activeFP->IsEmpty()) { // Not sure if we need to reset these each update or only when fp altered +#if (defined(_MSC_VER) && (_MSC_VER < 1300)) + _activeWaypoint.id = ""; +#else // #if (defined(_MSC_VER) && (_MSC_VER < 1300)) _activeWaypoint.id.clear(); +#endif // #if (defined(_MSC_VER) && (_MSC_VER < 1300)) _navFlagged = true; } else if(_activeFP->waypoints.size() == 1) { +#if (defined(_MSC_VER) && (_MSC_VER < 1300)) + _activeWaypoint.id = ""; +#else // #if (defined(_MSC_VER) && (_MSC_VER < 1300)) _activeWaypoint.id.clear(); +#endif // #if (defined(_MSC_VER) && (_MSC_VER < 1300)) } else { _navFlagged = false; if(_activeWaypoint.id.empty() || _fromWaypoint.id.empty()) { @@ -1169,14 +1180,22 @@ //cout << "Orientating...\n"; //cout << "_lat = " << _lat << ", _lon = " << _lon << ", _gpsLat = " << _gpsLat << ", gpsLon = " << _gpsLon << '\n'; if(fp->IsEmpty()) { +#if (defined(_MSC_VER) && (_MSC_VER < 1300)) + _activeWaypoint.id = ""; +#else // #if (defined(_MSC_VER) && (_MSC_VER < 1300)) _activeWaypoint.id.clear(); +#endif // #if (defined(_MSC_VER) && (_MSC_VER < 1300)) _navFlagged = true; } else { _navFlagged = false; if(fp->waypoints.size() == 1) { // TODO - may need to flag nav here if not dto or obs, or possibly handle it somewhere else. _activeWaypoint = *fp->waypoints[0]; - _fromWaypoint.id.clear(); +#if (defined(_MSC_VER) && (_MSC_VER < 1300)) + _activeWaypoint.id = ""; +#else // #if (defined(_MSC_VER) && (_MSC_VER < 1300)) + _activeWaypoint.id.clear(); +#endif // #if (defined(_MSC_VER) && (_MSC_VER < 1300)) } else { // FIXME FIXME FIXME _fromWaypoint = *fp->waypoints[0]; diff -ur -x *.dsw -x *.dsp -x *.cfg -x *.dll -x *.exe -x *.suo -x *.obj -x *.ncb -x *.pdb -x *.idb -x *.ilk -x *.pch -x *.lib -x *.dep -x *.mak -x *.opt -x *.plg -x Debug -x Release c:\FGCVS\FlightGear\source\src\Instrumentation\instrument_mgr.cxx source\src\Instrumentation\instrument_mgr.cxx --- c:\FGCVS\FlightGear\source\src\Instrumentation\instrument_mgr.cxx Sun Mar 05 14:11:02 2006 +++ source\src\Instrumentation\instrument_mgr.cxx Tue Apr 11 20:26:45 2006 @@ -2,7 +2,7 @@ // Written by David Megginson, started 2002. // // This file is in the Public Domain and comes with no warranty. - +#pragma warning( disable:4786; disable:4503) #ifdef HAVE_CONFIG_H # include #endif diff -ur -x *.dsw -x *.dsp -x *.cfg -x *.dll -x *.exe -x *.suo -x *.obj -x *.ncb -x *.pdb -x *.idb -x *.ilk -x *.pch -x *.lib -x *.dep -x *.mak -x *.opt -x *.plg -x Debug -x Release c:\FGCVS\FlightGear\source\src\Instrumentation\KLN89\kln89.cxx source\src\Instrumentation\KLN89\kln89.cxx --- c:\FGCVS\FlightGear\source\src\Instrumentation\KLN89\kln89.cxx Wed Feb 22 15:09:53 2006 +++ source\src\Instrumentation\KLN89\kln89.cxx Tue Apr 11 20:58:58 2006 @@ -172,13 +172,14 @@ } KLN89::~KLN89() { - for(unsigned int i=0; i<_pages.size(); ++i) { + unsigned int i; + for(i=0; i<_pages.size(); ++i) { delete _pages[i]; } delete _dir_page; - for(unsigned int i=0; i<_maxFlightPlans; ++i) { + for(i=0; i<_maxFlightPlans; ++i) { ClearFlightPlan(i); delete _flightPlans[i]; } @@ -686,7 +687,7 @@ } } // ASSERT(xvec.size() == yvec.size() == qvec.size() == _activeFP->waypoints.size()); - for(unsigned int i=0; i 2); bool top = (qvec[i] == 1 || qvec[i] == 4); @@ -801,7 +802,7 @@ for(int i=x-1; i<=x+1; ++i) { _instrument->DrawPixel(i, y-2); } - for(int i=x-2; i<=x+2; ++i) { + for(i=x-2; i<=x+2; ++i) { _instrument->DrawPixel(i, y+1); } } else { @@ -1035,15 +1036,15 @@ px += 4; // N - for(int i=0; i<4; ++i) _instrument->DrawPixel(px, py+i); + for(i=0; i<4; ++i) _instrument->DrawPixel(px, py+i); _instrument->DrawPixel(px+1, py+2); _instrument->DrawPixel(px+2, py+1); - for(int i=0; i<4; ++i) _instrument->DrawPixel(px+3, py+i); + for(i=0; i<4; ++i) _instrument->DrawPixel(px+3, py+i); px += 5; // T _instrument->DrawPixel(px, py+3); - for(int i=0; i<4; ++i) _instrument->DrawPixel(px+1, py+i); + for(i=0; i<4; ++i) _instrument->DrawPixel(px+1, py+i); _instrument->DrawPixel(px+2, py+3); } diff -ur -x *.dsw -x *.dsp -x *.cfg -x *.dll -x *.exe -x *.suo -x *.obj -x *.ncb -x *.pdb -x *.idb -x *.ilk -x *.pch -x *.lib -x *.dep -x *.mak -x *.opt -x *.plg -x Debug -x Release c:\FGCVS\FlightGear\source\src\Instrumentation\KLN89\kln89_page_dir.cxx source\src\Instrumentation\KLN89\kln89_page_dir.cxx --- c:\FGCVS\FlightGear\source\src\Instrumentation\KLN89\kln89_page_dir.cxx Wed Feb 22 15:09:53 2006 +++ source\src\Instrumentation\KLN89\kln89_page_dir.cxx Tue Apr 11 20:59:37 2006 @@ -85,7 +85,8 @@ if(_kln89->_mode == KLN89_MODE_CRSR) { if(_DToWpDispMode <= 1) { _DToWpDispMode = 2; - _id.clear(); + //_id.clear(); + _id = ""; } else { // Restore the original master mode _kln89->_mode = _saveMasterMode; diff -ur -x *.dsw -x *.dsp -x *.cfg -x *.dll -x *.exe -x *.suo -x *.obj -x *.ncb -x *.pdb -x *.idb -x *.ilk -x *.pch -x *.lib -x *.dep -x *.mak -x *.opt -x *.plg -x Debug -x Release c:\FGCVS\FlightGear\source\src\Instrumentation\KLN89\kln89_page_fpl.cxx source\src\Instrumentation\KLN89\kln89_page_fpl.cxx --- c:\FGCVS\FlightGear\source\src\Instrumentation\KLN89\kln89_page_fpl.cxx Wed Feb 22 15:09:53 2006 +++ source\src\Instrumentation\KLN89\kln89_page_fpl.cxx Tue Apr 11 21:02:37 2006 @@ -97,7 +97,7 @@ wp.id = "FFFF"; wp.type = GPS_WP_VIRT; wp.appType = GPS_FENCE; - for(unsigned int i=0; i_mode == KLN89_MODE_DISP) { - _fp0SelWpId.clear(); + _fp0SelWpId = ""; if(_bEntWp) { for(unsigned int i = 0; i < _kln89->_flightPlans[_subPage]->waypoints.size(); ++i) { if(_kln89->_flightPlans[_subPage]->waypoints[i] == _entWp) { @@ -557,7 +557,7 @@ delete _entWp; _entWp = NULL; _bEntWp = false; - _entWpStr.clear(); + _entWpStr = ""; } } else { if(_kln89->_obsMode) { @@ -648,7 +648,7 @@ } delete _entWp; _entWp = NULL; - _entWpStr.clear(); + _entWpStr = ""; KLN89Page::CleanUp(); } @@ -657,7 +657,7 @@ _resetFplPos0 = true; _wLinePos = 0; _uLinePos = 0; - _fp0SelWpId.clear(); + _fp0SelWpId = ""; _scratchpadMsg = false; } @@ -679,7 +679,7 @@ _bEntWp = false; _bEntExp = false; _entWp = NULL; // DON'T delete it! - it's been pushed onto the waypoint list at this point. - _entWpStr.clear(); + _entWpStr = ""; _kln89->_cleanUpPage = -1; _wLinePos = 0; // TODO - in actual fact the previously underlined waypoint stays in the same position and underlined @@ -801,12 +801,12 @@ if(_fencePos >= 0 && ix >= _fencePos) ix--; if(_hdrPos >= 0 && ix >= _hdrPos) ix--; if(ix >= _kln89->_activeFP->waypoints.size()) { - _fp0SelWpId.clear(); + _fp0SelWpId = ""; } else { _fp0SelWpId = _kln89->_activeFP->waypoints[ix]->id; } } else { - _fp0SelWpId.clear(); + _fp0SelWpId = ""; //cout << "Not page 0, or not in waypoints, clearing id!\n"; } } @@ -874,12 +874,12 @@ if(_fencePos >= 0 && ix >= _fencePos) ix--; if(_hdrPos >= 0 && ix >= _hdrPos) ix--; if(ix >= _kln89->_activeFP->waypoints.size()) { - _fp0SelWpId.clear(); + _fp0SelWpId = ""; } else { _fp0SelWpId = _kln89->_activeFP->waypoints[ix]->id; } } else { - _fp0SelWpId.clear(); + _fp0SelWpId = ""; //cout << "Not page 0, or not in waypoints, clearing id!\n"; } } @@ -936,7 +936,7 @@ _entWpStr[_wLinePos] = _kln89->DecChar(_entWpStr[_wLinePos], (_wLinePos == 0 ? false : true)); } _bEntWp = true; - _fp0SelWpId.clear(); // Waypoints don't become the DTO default whilst being entered. + _fp0SelWpId = ""; // Waypoints don't become the DTO default whilst being entered. bool multi; const GPSWaypoint* wp = _kln89->FindFirstById(_entWpStr.substr(0, _wLinePos+1), multi, false); @@ -1009,7 +1009,7 @@ _entWpStr[_wLinePos] = _kln89->DecChar(_entWpStr[_wLinePos], (_wLinePos == 0 ? false : true)); } _bEntWp = true; - _fp0SelWpId.clear(); // Waypoints don't become the DTO default whilst being entered. + _fp0SelWpId = ""; // Waypoints don't become the DTO default whilst being entered. bool multi; const GPSWaypoint* wp = _kln89->FindFirstById(_entWpStr.substr(0, _wLinePos+1), multi, false); diff -ur -x *.dsw -x *.dsp -x *.cfg -x *.dll -x *.exe -x *.suo -x *.obj -x *.ncb -x *.pdb -x *.idb -x *.ilk -x *.pch -x *.lib -x *.dep -x *.mak -x *.opt -x *.plg -x Debug -x Release c:\FGCVS\FlightGear\source\src\Instrumentation\mk_viii.cxx source\src\Instrumentation\mk_viii.cxx --- c:\FGCVS\FlightGear\source\src\Instrumentation\mk_viii.cxx Sat Mar 11 18:05:17 2006 +++ source\src\Instrumentation\mk_viii.cxx Thu Apr 13 15:36:34 2006 @@ -48,7 +48,8 @@ // make no sense. #ifdef _MSC_VER -# pragma warning( disable: 4355 ) +#pragma warning( disable:4786; disable:4503) +#pragma warning( disable: 4355 ) #endif #ifdef HAVE_CONFIG_H @@ -235,7 +236,8 @@ void MK_VIII::PropertiesHandler::unbind () { - vector::iterator iter; + typedef vector vecSGPNPtr; + vecSGPNPtr::iterator iter; for (iter = tied_properties.begin(); iter != tied_properties.end(); iter++) (*iter)->untie(); @@ -1007,8 +1009,8 @@ { // [PILOT] page 20 specifies that the terrain clearance is equal to // 75% of the radio altitude, averaged over the previous 15 seconds. - - deque< Sample >::iterator iter; + typedef deque< Sample > deqSamd; + deqSamd::iterator iter; // remove samples older than 15 seconds for (iter = samples.begin(); iter != samples.end() && globals->get_sim_time_sec() - (*iter).timestamp >= 15; iter = samples.begin()) @@ -1266,9 +1268,9 @@ // Erase everything from the beginning of the list up to the sample // preceding the most recent sample whose age is >= 1 second. - - deque< Sample< Parameter > >::iterator erase_last = altitude_samples.begin(); - deque< Sample< Parameter > >::iterator iter; + typedef deque< Sample< Parameter > > deqSamPard; + deqSamPard::iterator erase_last = altitude_samples.begin(); + deqSamPard::iterator iter; for (iter = altitude_samples.begin(); iter != altitude_samples.end(); iter++) if (globals->get_sim_time_sec() - (*iter).timestamp >= 1) @@ -1364,6 +1366,7 @@ update_terrain_clearance(); } +#if !defined(_MSC_VER) || (_MSC_VER > 1200) void MK_VIII::IOHandler::handle_input_fault (bool test, FaultHandler::Fault fault) { @@ -1396,6 +1399,7 @@ timer->stop(); } } +#endif // #if !defined(_MSC_VER) || (_MSC_VER > 1200) void MK_VIII::IOHandler::update_input_faults () @@ -1403,6 +1407,7 @@ if (mk->configuration_module.state != ConfigurationModule::STATE_OK) return; +#if !defined(_MSC_VER) || (_MSC_VER > 1200) // [INSTALL] 3.15.1.3 handle_input_fault(mk_dinput(audio_inhibit), &audio_inhibit_fault_timer, @@ -1499,6 +1504,7 @@ || mk_data(gps_longitude).ncd || mk_data(gps_vertical_figure_of_merit).ncd, FaultHandler::FAULT_TCF_INPUTS_INVALID); +#endif // #if !defined(_MSC_VER) || (_MSC_VER > 1200) } void @@ -2150,7 +2156,8 @@ void MK_VIII::VoicePlayer::Speaker::update_configuration () { - map::iterator iter; + typedef map mapstrSGSPtr; + mapstrSGSPtr::iterator iter; for (iter = player->samples.begin(); iter != player->samples.end(); iter++) { SGSoundSample *sample = (*iter).second; @@ -2234,7 +2241,8 @@ MK_VIII::VoicePlayer::~VoicePlayer () { - vector::iterator iter1; + typedef vector vecVoiPtr; + vecVoiPtr::iterator iter1; for (iter1 = _voices.begin(); iter1 != _voices.end(); iter1++) delete *iter1; _voices.clear(); @@ -2466,6 +2474,7 @@ MK_VIII::SelfTestHandler::Action MK_VIII::SelfTestHandler::run () { + int i = 0; // Note that "Terrain INOP" and "Terrain NA" are or'ed to the same // output discrete (see [SPEC] 6.9.3.5). @@ -2610,7 +2619,7 @@ if (mk->mode6_handler.conf.above_field_voice) return play(mk->mode6_handler.conf.above_field_voice); } - for (int i = 0; i < n_altitude_callouts; i++) + for ( i = 0; i < n_altitude_callouts; i++) if (! was_here_offset(i)) { if (mk->mode6_handler.conf.altitude_callouts_enabled[i]) @@ -4703,10 +4712,11 @@ bool MK_VIII::TCFHandler::is_inside_bias_area () { + int i; double az1[4]; double angles_sum = 0; - for (int i = 0; i < 4; i++) + for (i = 0; i < 4; i++) { double az2, distance; geo_inverse_wgs_84(0, @@ -4717,7 +4727,7 @@ &az1[i], &az2, &distance); } - for (int i = 0; i < 4; i++) + for (i = 0; i < 4; i++) { double angle = az1[i == 3 ? 0 : i + 1] - az1[i]; if (angle < -180) diff -ur -x *.dsw -x *.dsp -x *.cfg -x *.dll -x *.exe -x *.suo -x *.obj -x *.ncb -x *.pdb -x *.idb -x *.ilk -x *.pch -x *.lib -x *.dep -x *.mak -x *.opt -x *.plg -x Debug -x Release c:\FGCVS\FlightGear\source\src\Instrumentation\mk_viii.hxx source\src\Instrumentation\mk_viii.hxx --- c:\FGCVS\FlightGear\source\src\Instrumentation\mk_viii.hxx Sun Apr 09 13:33:09 2006 +++ source\src\Instrumentation\mk_viii.hxx Wed Apr 12 17:31:15 2006 @@ -43,11 +43,13 @@ /////////////////////////////////////////////////////////////////////////////// // MK_VIII //////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// + static const int n_altitude_callouts = 11; class MK_VIII : public SGSubsystem { +public: // keep in sync with Mode6Handler::altitude_callout_definitions[] - static const int n_altitude_callouts = 11; + //static const int n_altitude_callouts = 11; ///////////////////////////////////////////////////////////////////////////// // MK_VIII::RawValueMethodsData ///////////////////////////////////////////// @@ -85,7 +87,7 @@ return new RawValueMethodsData(_obj, _data, _getter, _setter); } - private: + // private: C &_obj; DT _data; getter_t _getter; @@ -99,6 +101,7 @@ template class Parameter { +public: T _value; public: @@ -150,6 +153,7 @@ class Timer { + public: double start_time; public: @@ -179,6 +183,7 @@ class PropertiesHandler { + public: MK_VIII *mk; vector tied_properties; @@ -241,13 +246,14 @@ public: PropertiesHandler properties_handler; -private: +//private: ///////////////////////////////////////////////////////////////////////////// // MK_VIII::PowerHandler //////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// class PowerHandler { + public: MK_VIII *mk; bool serviceable; @@ -280,6 +286,7 @@ class SystemHandler { + public: MK_VIII *mk; double boot_delay; @@ -352,7 +359,7 @@ void boot (); void bind (SGPropertyNode *node); - private: +// private: MK_VIII *mk; int categories[N_CATEGORIES]; @@ -387,6 +394,7 @@ class FaultHandler { + public: enum { INOP_GPWS = 1 << 0, @@ -613,7 +621,7 @@ MK_VIII *mk; - private: + //private: /////////////////////////////////////////////////////////////////////////// // MK_VIII::IOHandler::TerrainClearanceFilter ///////////////////////////// @@ -621,10 +629,10 @@ class TerrainClearanceFilter { + public: deque< Sample > samples; double value; - public: inline TerrainClearanceFilter () : value(0) {} @@ -664,11 +672,13 @@ void update_terrain_clearance (); void reset_terrain_clearance (); +#if !defined(_MSC_VER) || (_MSC_VER > 1200) void handle_input_fault (bool test, FaultHandler::Fault fault); void handle_input_fault (bool test, Timer *timer, double max_duration, FaultHandler::Fault fault); +#endif // #if !defined(_MSC_VER) || (_MSC_VER > 1200) void tie_input (SGPropertyNode *node, const char *name, @@ -738,10 +748,10 @@ class SampleElement : public Element { + public: SGSoundSample *_sample; double _volume; - public: inline SampleElement (SGSoundSample *sample, double volume = 1.0) : _sample(sample), _volume(volume) { silence = false; } @@ -757,10 +767,10 @@ class SilenceElement : public Element { + public: double _duration; double start_time; - public: inline SilenceElement (double duration) : _duration(duration) { silence = true; } @@ -787,13 +797,13 @@ void volume_changed (); void update (); - private: + // private: VoicePlayer *player; double volume; - - vector elements; - vector::iterator iter; + typedef vector vecElePtr; + vecElePtr elements; + vecElePtr::iterator iter; inline double get_volume () const { return player->volume * player->speaker.volume * volume; } }; @@ -877,6 +887,7 @@ class Speaker { + public: VoicePlayer *player; double pitch; @@ -926,7 +937,7 @@ void update_configuration (); }; - private: +// private: /////////////////////////////////////////////////////////////////////////// // MK_VIII::VoicePlayer (continued) /////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// @@ -959,13 +970,14 @@ inline void make_voice (Voice **voice, T1 e1, T2 e2, T3 e3, T4 e4) { make_voice(voice, e1, e2, e3); append(*voice, e4); } }; -private: +//private: ///////////////////////////////////////////////////////////////////////////// // MK_VIII::SelfTestHandler ///////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// class SelfTestHandler { + public: MK_VIII *mk; typedef enum @@ -1038,6 +1050,7 @@ class AlertHandler { + public: MK_VIII *mk; unsigned int old_alerts; @@ -1116,6 +1129,7 @@ class StateHandler { + public: MK_VIII *mk; Timer potentially_airborne_timer; @@ -1145,6 +1159,7 @@ class Mode1Handler { + public: MK_VIII *mk; Timer pull_up_timer; @@ -1190,6 +1205,7 @@ class Mode2Handler { + public: /////////////////////////////////////////////////////////////////////////// // MK_VIII::Mode2Handler::ClosureRateFilter /////////////////////////////// @@ -1197,12 +1213,14 @@ class ClosureRateFilter { + public: ///////////////////////////////////////////////////////////////////////// // MK_VIII::Mode2Handler::ClosureRateFilter::PassFilter ///////////////// ///////////////////////////////////////////////////////////////////////// class PassFilter { + public: double a0; double a1; double b1; @@ -1305,6 +1323,7 @@ class Mode3Handler { + public: MK_VIII *mk; bool armed; @@ -1367,7 +1386,7 @@ double get_upper_agl (const EnvelopesConfiguration *c); void update (); - private: +// private: MK_VIII *mk; double ab_bias; @@ -1389,6 +1408,7 @@ class Mode5Handler { + public: MK_VIII *mk; Timer hard_timer; @@ -1462,7 +1482,7 @@ bool altitude_callouts_enabled (); void update (); - private: +// private: MK_VIII *mk; bool last_decision_height; @@ -1510,6 +1530,7 @@ class TCFHandler { + public: typedef struct { double latitude; // latitude in degrees @@ -1580,7 +1601,7 @@ ///////////////////////////////////////////////////////////////////////////// // MK_VIII (continued) ////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// - + public: string name; int num; diff -ur -x *.dsw -x *.dsp -x *.cfg -x *.dll -x *.exe -x *.suo -x *.obj -x *.ncb -x *.pdb -x *.idb -x *.ilk -x *.pch -x *.lib -x *.dep -x *.mak -x *.opt -x *.plg -x Debug -x Release c:\FGCVS\FlightGear\source\src\Main\options.cxx source\src\Main\options.cxx --- c:\FGCVS\FlightGear\source\src\Main\options.cxx Tue Mar 21 19:28:35 2006 +++ source\src\Main\options.cxx Tue Apr 11 21:07:35 2006 @@ -1718,13 +1718,25 @@ // A simple function to return an integer depending on the position // of the status string within the array in order to determine the hierarchy. +//unsigned int getNumMaturity(const char * str) +//{ + // changes should also be reflected in $FG_ROOT/data/options.xml & + // $FG_ROOT/data/Translations/string-default.xml +// const char levels[][20]= {"alpha","beta","early-production","production",0}; + +// for (unsigned int i=0; i<(sizeof(levels)/sizeof(levels[0])-1);i++) +// if (strcmp(str,levels[i])==0) +// return i; + +// return 0; +//}; unsigned int getNumMaturity(const char * str) { // changes should also be reflected in $FG_ROOT/data/options.xml & // $FG_ROOT/data/Translations/string-default.xml - const char levels[][20]= {"alpha","beta","early-production","production",0}; + char * levels[] = {"alpha","beta","early-production","production",0}; - for (unsigned int i=0; i<(sizeof(levels)/sizeof(levels[0])-1);i++) + for (unsigned int i=0; i<4;i++) if (strcmp(str,levels[i])==0) return i; @@ -1834,7 +1846,8 @@ fgSearchAircraft( path, aircraft, recursive ); - sort(aircraft.begin(), aircraft.end()); + //sort(aircraft.begin(), aircraft.end()); + std::sort(aircraft.begin(), aircraft.end()); SG_LOG( SG_GENERAL, SG_ALERT, "" ); // To popup the console on Windows cout << "Available aircraft:" << endl; for ( unsigned int i = 0; i < aircraft.size(); i++ ) { diff -ur -x *.dsw -x *.dsp -x *.cfg -x *.dll -x *.exe -x *.suo -x *.obj -x *.ncb -x *.pdb -x *.idb -x *.ilk -x *.pch -x *.lib -x *.dep -x *.mak -x *.opt -x *.plg -x Debug -x Release c:\FGCVS\FlightGear\source\src\Main\viewer.cxx source\src\Main\viewer.cxx --- c:\FGCVS\FlightGear\source\src\Main\viewer.cxx Wed Feb 22 15:09:55 2006 +++ source\src\Main\viewer.cxx Tue Apr 11 21:07:52 2006 @@ -145,7 +145,7 @@ } // multiply matrices - for ( int j = 0 ; j < 3 ; j++ ) { + for ( j = 0 ; j < 3 ; j++ ) { dst[0][j] = mat3[0][0] * matt[0][j] + mat3[0][1] * matt[1][j] + mat3[0][2] * matt[2][j]; diff -ur -x *.dsw -x *.dsp -x *.cfg -x *.dll -x *.exe -x *.suo -x *.obj -x *.ncb -x *.pdb -x *.idb -x *.ilk -x *.pch -x *.lib -x *.dep -x *.mak -x *.opt -x *.plg -x Debug -x Release c:\FGCVS\FlightGear\source\src\Model\modelmgr.cxx source\src\Model\modelmgr.cxx --- c:\FGCVS\FlightGear\source\src\Model\modelmgr.cxx Fri Mar 31 12:07:35 2006 +++ source\src\Model\modelmgr.cxx Tue Apr 11 21:10:08 2006 @@ -179,7 +179,8 @@ void FGModelMgr::remove_instance (Instance * instance) { - vector::iterator it; + typedef vector vecInstPtr; + vecInstPtr::iterator it; for (it = _instances.begin(); it != _instances.end(); it++) { if (*it == instance) { _instances.erase(it); @@ -248,8 +249,9 @@ return; // search instance by node and remove it from scenegraph - vector::iterator it = _mgr->_instances.begin(); - vector::iterator end = _mgr->_instances.end(); + typedef vector InstVec; + InstVec::iterator it = _mgr->_instances.begin(); + InstVec::iterator end = _mgr->_instances.end(); for (; it != end; ++it) { Instance *instance = *it; diff -ur -x *.dsw -x *.dsp -x *.cfg -x *.dll -x *.exe -x *.suo -x *.obj -x *.ncb -x *.pdb -x *.idb -x *.ilk -x *.pch -x *.lib -x *.dep -x *.mak -x *.opt -x *.plg -x Debug -x Release c:\FGCVS\FlightGear\source\src\Model\modelmgr.hxx source\src\Model\modelmgr.hxx --- c:\FGCVS\FlightGear\source\src\Model\modelmgr.hxx Tue Mar 21 19:28:35 2006 +++ source\src\Model\modelmgr.hxx Tue Apr 11 21:10:45 2006 @@ -107,6 +107,7 @@ SGPropertyNode_ptr _models; Listener * _listener; + public: vector _instances; diff -ur -x *.dsw -x *.dsp -x *.cfg -x *.dll -x *.exe -x *.suo -x *.obj -x *.ncb -x *.pdb -x *.idb -x *.ilk -x *.pch -x *.lib -x *.dep -x *.mak -x *.opt -x *.plg -x Debug -x Release c:\FGCVS\FlightGear\source\src\MultiPlayer\multiplaymgr.cxx source\src\MultiPlayer\multiplaymgr.cxx --- c:\FGCVS\FlightGear\source\src\MultiPlayer\multiplaymgr.cxx Wed Mar 29 15:51:29 2006 +++ source\src\MultiPlayer\multiplaymgr.cxx Wed Apr 12 11:44:34 2006 @@ -256,15 +256,15 @@ PosMsg.position[i] = XDR_encode_double (motionInfo.position(i)); SGVec3f angleAxis; motionInfo.orientation.getAngleAxis(angleAxis); - for (unsigned i = 0 ; i < 3; ++i) + for (i = 0 ; i < 3; ++i) PosMsg.orientation[i] = XDR_encode_float (angleAxis(i)); - for (unsigned i = 0 ; i < 3; ++i) + for (i = 0 ; i < 3; ++i) PosMsg.linearVel[i] = XDR_encode_float (motionInfo.linearVel(i)); - for (unsigned i = 0 ; i < 3; ++i) + for (i = 0 ; i < 3; ++i) PosMsg.angularVel[i] = XDR_encode_float (motionInfo.angularVel(i)); - for (unsigned i = 0 ; i < 3; ++i) + for (i = 0 ; i < 3; ++i) PosMsg.linearAccel[i] = XDR_encode_float (motionInfo.linearAccel(i)); - for (unsigned i = 0 ; i < 3; ++i) + for (i = 0 ; i < 3; ++i) PosMsg.angularAccel[i] = XDR_encode_float (motionInfo.angularAccel(i)); char Msg[MAX_PACKET_SIZE]; @@ -452,16 +452,16 @@ for (unsigned i = 0; i < 3; ++i) motionInfo.position(i) = XDR_decode_double(PosMsg->position[i]); SGVec3f angleAxis; - for (unsigned i = 0; i < 3; ++i) + for ( i = 0; i < 3; ++i) angleAxis(i) = XDR_decode_float(PosMsg->orientation[i]); motionInfo.orientation = SGQuatf::fromAngleAxis(angleAxis); - for (unsigned i = 0; i < 3; ++i) + for ( i = 0; i < 3; ++i) motionInfo.linearVel(i) = XDR_decode_float(PosMsg->linearVel[i]); - for (unsigned i = 0; i < 3; ++i) + for ( i = 0; i < 3; ++i) motionInfo.angularVel(i) = XDR_decode_float(PosMsg->angularVel[i]); - for (unsigned i = 0; i < 3; ++i) + for ( i = 0; i < 3; ++i) motionInfo.linearAccel(i) = XDR_decode_float(PosMsg->linearAccel[i]); - for (unsigned i = 0; i < 3; ++i) + for ( i = 0; i < 3; ++i) motionInfo.angularAccel(i) = XDR_decode_float(PosMsg->angularAccel[i]); T_PropertyMsg* PropMsg diff -ur -x *.dsw -x *.dsp -x *.cfg -x *.dll -x *.exe -x *.suo -x *.obj -x *.ncb -x *.pdb -x *.idb -x *.ilk -x *.pch -x *.lib -x *.dep -x *.mak -x *.opt -x *.plg -x Debug -x Release c:\FGCVS\FlightGear\source\src\Network\multiplay.cxx source\src\Network\multiplay.cxx --- c:\FGCVS\FlightGear\source\src\Network\multiplay.cxx Wed Feb 22 15:09:56 2006 +++ source\src\Network\multiplay.cxx Wed Apr 12 17:03:39 2006 @@ -120,7 +120,7 @@ * or receive data over the network ******************************************************************/ bool FGMultiplay::process() { - +#if !defined(_MSC_VER) || (_MSC_VER > 1200) if (get_direction() == SG_IO_OUT) { // check if we have left initialization phase. That will not provide @@ -207,6 +207,7 @@ FGMultiplayMgr* mpmgr = globals->get_multiplayer_mgr(); mpmgr->SendMyPosition(motionInfo); } +#endif // #if !defined(_MSC_VER) || (_MSC_VER > 1200) return true; } diff -ur -x *.dsw -x *.dsp -x *.cfg -x *.dll -x *.exe -x *.suo -x *.obj -x *.ncb -x *.pdb -x *.idb -x *.ilk -x *.pch -x *.lib -x *.dep -x *.mak -x *.opt -x *.plg -x Debug -x Release c:\FGCVS\FlightGear\source\src\Sound\voice.hxx source\src\Sound\voice.hxx --- c:\FGCVS\FlightGear\source\src\Sound\voice.hxx Sat Apr 01 19:02:43 2006 +++ source\src\Sound\voice.hxx Wed Apr 12 11:49:03 2006 @@ -55,7 +55,7 @@ void init(void); void update(double dt); -private: +//private: class FGVoice; #if defined(ENABLE_THREADS) @@ -101,7 +101,7 @@ void setSpeed(double); void pushMessage(string); -private: +//private: class FGVoiceListener; SGSocket *_sock; double _volume; diff -ur -x *.dsw -x *.dsp -x *.cfg -x *.dll -x *.exe -x *.suo -x *.obj -x *.ncb -x *.pdb -x *.idb -x *.ilk -x *.pch -x *.lib -x *.dep -x *.mak -x *.opt -x *.plg -x Debug -x Release c:\FGCVS\FlightGear\source\src\Traffic\Schedule.cxx source\src\Traffic\Schedule.cxx --- c:\FGCVS\FlightGear\source\src\Traffic\Schedule.cxx Fri Mar 31 12:07:35 2006 +++ source\src\Traffic\Schedule.cxx Wed Apr 12 11:54:43 2006 @@ -215,7 +215,7 @@ // Sort all the scheduled flights according to scheduled departure time. // Because this is done at every update, we only need to check the status // of the first listed flight. - sort(flights.begin(), flights.end()); + std::sort(flights.begin(), flights.end()); FGScheduledFlightVecIterator i = flights.begin(); if (AIManagerRef) { @@ -430,7 +430,7 @@ void FGAISchedule::next() { flights.begin()->update(); - sort(flights.begin(), flights.end()); + std::sort(flights.begin(), flights.end()); } double FGAISchedule::getSpeed() diff -ur -x *.dsw -x *.dsp -x *.cfg -x *.dll -x *.exe -x *.suo -x *.obj -x *.ncb -x *.pdb -x *.idb -x *.ilk -x *.pch -x *.lib -x *.dep -x *.mak -x *.opt -x *.plg -x Debug -x Release c:\FGCVS\FlightGear\source\src\Traffic\TrafficMgr.cxx source\src\Traffic\TrafficMgr.cxx --- c:\FGCVS\FlightGear\source\src\Traffic\TrafficMgr.cxx Sat Apr 01 19:02:43 2006 +++ source\src\Traffic\TrafficMgr.cxx Wed Apr 12 11:57:04 2006 @@ -33,7 +33,7 @@ * * *****************************************************************************/ - +#pragma warning( disable:4786; disable:4503) #ifdef HAVE_CONFIG_H # include "config.h" #endif @@ -97,7 +97,7 @@ } } //cerr << "Sorting by distance " << endl; - sort(scheduledAircraft.begin(), scheduledAircraft.end()); + std::sort(scheduledAircraft.begin(), scheduledAircraft.end()); currAircraft = scheduledAircraft.begin(); currAircraftClosest = scheduledAircraft.begin(); //cerr << "Done initializing schedules" << endl;