From 68539c69f91387ec9ddec0e16003bd7417aac829 Mon Sep 17 00:00:00 2001 From: curt Date: Tue, 6 Jan 1998 01:20:16 +0000 Subject: [PATCH] Tweaks to help building with MSVC++ --- LaRCsim/ls_interface.c | 6 +++++- LaRCsim/ls_sim_control.h | 5 +++++ Scenery/common.c | 11 +++++++++-- Scenery/geometry.c | 8 ++++++-- Scenery/moon.c | 10 +++++++--- Time/event.c | 10 +++++++--- 6 files changed, 39 insertions(+), 11 deletions(-) diff --git a/LaRCsim/ls_interface.c b/LaRCsim/ls_interface.c index a1200045d..32bbe8112 100644 --- a/LaRCsim/ls_interface.c +++ b/LaRCsim/ls_interface.c @@ -291,8 +291,9 @@ void ls_stamp() sprintf(sim_control_.date_string, "%06d\0", date); sprintf(sim_control_.time_stamp, "%02d:%02d:%02d\0", nowtime->tm_hour, nowtime->tm_min, nowtime->tm_sec); +#ifdef COMPILE_THIS_CODE_THIS_USELESS_CODE cuserid( sim_control_.userid ); /* set up user id */ - +#endif /* COMPILE_THIS_CODE_THIS_USELESS_CODE */ return; } @@ -912,6 +913,9 @@ int fgLaRCsim_2_Flight (struct fgFLIGHT *f) { /* Flight Gear Modification Log * * $Log$ + * Revision 1.12 1998/01/06 01:20:16 curt + * Tweaks to help building with MSVC++ + * * Revision 1.11 1998/01/05 22:19:26 curt * #ifdef'd out some unused code that was problematic for MSVC++ to compile. * diff --git a/LaRCsim/ls_sim_control.h b/LaRCsim/ls_sim_control.h index fbbe2a03d..c37f559f5 100644 --- a/LaRCsim/ls_sim_control.h +++ b/LaRCsim/ls_sim_control.h @@ -40,6 +40,9 @@ $Header$ $Log$ +Revision 1.2 1998/01/06 01:20:17 curt +Tweaks to help building with MSVC++ + Revision 1.1 1997/05/29 00:09:59 curt Initial Flight Gear revision. @@ -75,7 +78,9 @@ typedef struct { int run_number; /* run number of this session */ char date_string[7]; /* like "931220" */ char time_stamp[9]; /* like "13:00:00" */ +#ifdef COMPILE_THIS_CODE_THIS_USELESS_CODE char userid[L_cuserid]; /* who is running this sim */ +#endif /* COMPILE_THIS_CODE_THIS_USELESS_CODE */ long time_slices; /* number of points that can be recorded (circ buff) */ int write_av; /* will be writing out an Agile_VU file after run */ int write_mat; /* will be writing out a matrix script of session */ diff --git a/Scenery/common.c b/Scenery/common.c index 6c522c608..370144b6a 100644 --- a/Scenery/common.c +++ b/Scenery/common.c @@ -24,6 +24,10 @@ **************************************************************************/ +#ifdef WIN32 +#include +#endif + #include "common.h" @@ -44,9 +48,12 @@ char *strip_quotes(char *s) { /* $Log$ -/* Revision 1.2 1997/05/23 15:40:41 curt -/* Added GNU copyright headers. +/* Revision 1.3 1998/01/06 01:20:23 curt +/* Tweaks to help building with MSVC++ /* + * Revision 1.2 1997/05/23 15:40:41 curt + * Added GNU copyright headers. + * * Revision 1.1 1997/05/16 16:07:03 curt * Initial revision. * diff --git a/Scenery/geometry.c b/Scenery/geometry.c index da2b4b7bb..1d0970921 100644 --- a/Scenery/geometry.c +++ b/Scenery/geometry.c @@ -113,15 +113,19 @@ int vrmlFreeGeometry() { * because we need it to calculate current ground elevation * ... */ /* free(eg.mesh_data); */ + ; } return(vrmlGeometryType); } /* $Log$ -/* Revision 1.4 1997/08/27 03:30:26 curt -/* Changed naming scheme of basic shared structures. +/* Revision 1.5 1998/01/06 01:20:23 curt +/* Tweaks to help building with MSVC++ /* + * Revision 1.4 1997/08/27 03:30:26 curt + * Changed naming scheme of basic shared structures. + * * Revision 1.3 1997/07/08 18:20:13 curt * Working on establishing a hard ground. * diff --git a/Scenery/moon.c b/Scenery/moon.c index 4f4652be4..dd39f0722 100644 --- a/Scenery/moon.c +++ b/Scenery/moon.c @@ -29,6 +29,7 @@ #include "moon.h" #include "../Aircraft/aircraft.h" +#include "../Include/constants.h" #include "../Include/general.h" #include "../Main/views.h" #include "../Time/fg_time.h" @@ -242,7 +243,7 @@ struct CelestialCoord fgCalculateMoon(struct OrbElements params, rho = 0.99883 + 0.00167 * cos(2 * fgDegToRad(FG_Latitude)); if (geocCoord.RightAscension < 0) - geocCoord.RightAscension += (2*M_PI); + geocCoord.RightAscension += (2*FG_PI); HA = t.lst - (3.8197186 * geocCoord.RightAscension); @@ -319,9 +320,12 @@ void fgMoonRender() { /* $Log$ -/* Revision 1.15 1998/01/05 18:44:35 curt -/* Add an option to advance/decrease time from keyboard. +/* Revision 1.16 1998/01/06 01:20:24 curt +/* Tweaks to help building with MSVC++ /* + * Revision 1.15 1998/01/05 18:44:35 curt + * Add an option to advance/decrease time from keyboard. + * * Revision 1.14 1997/12/30 20:47:50 curt * Integrated new event manager with subsystem initializations. * diff --git a/Time/event.c b/Time/event.c index 8376c4441..6eb8c0c45 100644 --- a/Time/event.c +++ b/Time/event.c @@ -28,6 +28,7 @@ #include #ifdef USE_FTIME +# include # include /* for ftime() and struct timeb */ #else # include /* for get/setitimer, gettimeofday, struct timeval */ @@ -268,7 +269,7 @@ void fgEventPrintStats() { printf("-----------\n"); for ( i = 0; i < event_ptr; i++ ) { - printf(" %-20s int=%.2fs cum=%d min=%d max=%d count=%d ave=%.2f\n", + printf(" %-20s int=%.2fs cum=%ld min=%ld max=%ld count=%ld ave=%.2f\n", events[i].description, events[i].interval / 1000.0, events[i].cum_time, @@ -335,9 +336,12 @@ void fgEventProcess() { /* $Log$ -/* Revision 1.4 1997/12/31 17:46:50 curt -/* Tweaked fg_time.c to be able to use ftime() instead of gettimeofday() +/* Revision 1.5 1998/01/06 01:20:27 curt +/* Tweaks to help building with MSVC++ /* + * Revision 1.4 1997/12/31 17:46:50 curt + * Tweaked fg_time.c to be able to use ftime() instead of gettimeofday() + * * Revision 1.3 1997/12/30 22:22:42 curt * Further integration of event manager. * -- 2.39.2