1
0
Fork 0

Fixed a problems where a pointer to a function was being passed around. In

one place this functions arguments were defined as ( void ) while in another
place they were defined as ( int ).  The correct answer was ( int ).

Prepairing for C++ integration.
This commit is contained in:
curt 1998-04-21 17:01:43 +00:00
parent e2ddc6f2b8
commit 52727b75c6
5 changed files with 79 additions and 11 deletions

View file

@ -28,6 +28,11 @@
#define _EVENT_H #define _EVENT_H
#ifdef __cplusplus
extern "C" {
#endif
#define FG_EVENT_SUSP 0 #define FG_EVENT_SUSP 0
#define FG_EVENT_READY 1 #define FG_EVENT_READY 1
#define FG_EVENT_QUEUED 2 #define FG_EVENT_QUEUED 2
@ -61,13 +66,25 @@ void fgEventPrintStats( void );
void fgEventProcess( void ); void fgEventProcess( void );
#ifdef __cplusplus
}
#endif
#endif /* _EVENT_H */ #endif /* _EVENT_H */
/* $Log$ /* $Log$
/* Revision 1.3 1998/01/22 02:59:43 curt /* Revision 1.4 1998/04/21 17:01:43 curt
/* Changed #ifdef FILE_H to #ifdef _FILE_H /* Fixed a problems where a pointer to a function was being passed around. In
/* one place this functions arguments were defined as ( void ) while in another
/* place they were defined as ( int ). The correct answer was ( int ).
/* /*
/* Prepairing for C++ integration.
/*
* Revision 1.3 1998/01/22 02:59:43 curt
* Changed #ifdef FILE_H to #ifdef _FILE_H
*
* Revision 1.2 1998/01/19 18:40:39 curt * Revision 1.2 1998/01/19 18:40:39 curt
* Tons of little changes to clean up the code and to remove fatal errors * Tons of little changes to clean up the code and to remove fatal errors
* when building with the c++ compiler. * when building with the c++ compiler.

View file

@ -28,6 +28,11 @@
#define _FG_TIME_H #define _FG_TIME_H
#ifdef __cplusplus
extern "C" {
#endif
#include <config.h> #include <config.h>
#ifdef HAVE_WINDOWS_H #ifdef HAVE_WINDOWS_H
@ -111,13 +116,25 @@ void fgTimeInit(struct fgTIME *t);
void fgTimeUpdate(fgFLIGHT *f, struct fgTIME *t); void fgTimeUpdate(fgFLIGHT *f, struct fgTIME *t);
#ifdef __cplusplus
}
#endif
#endif /* _FG_TIME_H */ #endif /* _FG_TIME_H */
/* $Log$ /* $Log$
/* Revision 1.18 1998/04/08 23:35:40 curt /* Revision 1.19 1998/04/21 17:01:44 curt
/* Tweaks to Gnu automake/autoconf system. /* Fixed a problems where a pointer to a function was being passed around. In
/* one place this functions arguments were defined as ( void ) while in another
/* place they were defined as ( int ). The correct answer was ( int ).
/* /*
/* Prepairing for C++ integration.
/*
* Revision 1.18 1998/04/08 23:35:40 curt
* Tweaks to Gnu automake/autoconf system.
*
* Revision 1.17 1998/04/03 22:12:56 curt * Revision 1.17 1998/04/03 22:12:56 curt
* Converting to Gnu autoconf system. * Converting to Gnu autoconf system.
* Centralized time handling differences. * Centralized time handling differences.

View file

@ -61,7 +61,7 @@ void fgTimerCatch( void ) {
/* this routine initializes the interval timer to generate a SIGALRM after /* this routine initializes the interval timer to generate a SIGALRM after
* the specified interval (dt) */ * the specified interval (dt) */
void fgTimerInit(float dt, void (*f)()) { void fgTimerInit(float dt, void (*f)( int )) {
int terr; int terr;
int isec; int isec;
float usec; float usec;
@ -110,10 +110,17 @@ int fgGetTimeInterval( void ) {
/* $Log$ /* $Log$
/* Revision 1.11 1998/04/03 22:12:56 curt /* Revision 1.12 1998/04/21 17:01:44 curt
/* Converting to Gnu autoconf system. /* Fixed a problems where a pointer to a function was being passed around. In
/* Centralized time handling differences. /* one place this functions arguments were defined as ( void ) while in another
/* place they were defined as ( int ). The correct answer was ( int ).
/* /*
/* Prepairing for C++ integration.
/*
* Revision 1.11 1998/04/03 22:12:56 curt
* Converting to Gnu autoconf system.
* Centralized time handling differences.
*
* Revision 1.10 1998/01/31 00:43:45 curt * Revision 1.10 1998/01/31 00:43:45 curt
* Added MetroWorks patches from Carmen Volpe. * Added MetroWorks patches from Carmen Volpe.
* *

View file

@ -28,25 +28,42 @@
#define _FG_TIMER_H #define _FG_TIMER_H
#ifdef __cplusplus
extern "C" {
#endif
extern unsigned long int fgSimTime; extern unsigned long int fgSimTime;
/* this routine initializes the interval timer to generate a SIGALRM /* this routine initializes the interval timer to generate a SIGALRM
* after the specified interval (dt) the function f() will be called * after the specified interval (dt) the function f() will be called
* at each signal */ * at each signal */
void fgTimerInit( float dt, void (*f)( void ) ); void fgTimerInit( float dt, void (*f)( int ) );
/* This function returns the number of milleseconds since the last /* This function returns the number of milleseconds since the last
time it was called. */ time it was called. */
int fgGetTimeInterval( void ); int fgGetTimeInterval( void );
#ifdef __cplusplus
}
#endif
#endif /* _FG_TIMER_H */ #endif /* _FG_TIMER_H */
/* $Log$ /* $Log$
/* Revision 1.4 1998/01/22 02:59:43 curt /* Revision 1.5 1998/04/21 17:01:45 curt
/* Changed #ifdef FILE_H to #ifdef _FILE_H /* Fixed a problems where a pointer to a function was being passed around. In
/* one place this functions arguments were defined as ( void ) while in another
/* place they were defined as ( int ). The correct answer was ( int ).
/* /*
/* Prepairing for C++ integration.
/*
* Revision 1.4 1998/01/22 02:59:43 curt
* Changed #ifdef FILE_H to #ifdef _FILE_H
*
* Revision 1.3 1998/01/19 18:40:40 curt * Revision 1.3 1998/01/19 18:40:40 curt
* Tons of little changes to clean up the code and to remove fatal errors * Tons of little changes to clean up the code and to remove fatal errors
* when building with the c++ compiler. * when building with the c++ compiler.

View file

@ -40,6 +40,11 @@
#define _SUNPOS_H #define _SUNPOS_H
#ifdef __cplusplus
extern "C" {
#endif
#include <time.h> #include <time.h>
#include <Include/fg_types.h> #include <Include/fg_types.h>
@ -50,4 +55,9 @@ void fgUpdateSunPos( void );
void fgSunPosition(time_t ssue, double *lon, double *lat); void fgSunPosition(time_t ssue, double *lon, double *lat);
#ifdef __cplusplus
}
#endif
#endif /* _SUNPOS_H */ #endif /* _SUNPOS_H */